List Info

Thread: Custom nodetypes, any simple example?




Custom nodetypes, any simple example?
user name
2006-03-09 17:43:18
Hi again;
I need some properties fir the nodes in my repository, that
I haven't found in the nodetypes (if they already exists I
would appreciate to know).
For example, I need to control some documents with time
life, so the properties for this case would be:

my:timelife
        |_   my:timeini
        |_   my:timeend

So, I think the "my:timelife" is mix (?), and
the other child nodetypes are Date (I don't know who would
be the parent for "my:timelife"). There are some
more needs, but with this example I will mind the others.
Could someone mount a simple xml example with the tree
above? I will read this file in inicialization of repository
and extends it with my other needs..
Thanks a lot guys
Helio.
Custom nodetypes, any simple example?
user name
2006-03-09 22:54:45
On Thu, 2006-03-09 at 14:43 -0300, hsp wrote:
> 
> So, I think the "my:timelife" is mix (?),
and the other child
> nodetypes are Date (I don't know who would be the
parent for
> "my:timelife"). There are some more needs,
but with this example I
> will mind the others.
> Could someone mount a simple xml example with the tree
above? 

You can define a mixin nodeType with the my:timeini and
my:timeend
values stored as properties. Then you can attach that mixin
nodeType to
an existing node of your choice and add those properties. A
mixin node
doesn't have any parent nodeType. In CND notation;

<my = 'http://some.org/my/1.0'&g
t;
[my:timelife] mixin
- my:timeini (date) mandatory
- my:timeend (date) mandatory


-- 
Torgeir Veimo <torgeirpobox.com>

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )