You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Kalyan Sarkar <ka...@yahoo.co.in> on 2007/05/10 16:39:21 UTC

Any number of child nodes?

May sound stupid, but is there a way to define a nodetype that can have any
no. of child nodes?
-- 
View this message in context: http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10414651
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Any number of child nodes?

Posted by Kalyan Sarkar <ka...@yahoo.co.in>.
Hi Stefan,
I was wondering whether one can define a node that can have any number of
child nodes of a particular type, but with different names. I was thinking
like your example 1.

Thanks a lot.

Regards,
Kalyan Sarkar


Stefan Guggisberg wrote:
> 
> On 5/11/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
>>
>> Thanks a lot, I misunderstood the '*' for any name.
> 
> '*' does stand for any name, maybe i misunderstood your question ;)
> 
> a few examples:
> 
>     [foo]
>       + * (nt:base)
> 
> declares a node type 'foo' which can have any number of child nodes
> of type 'nt:base' (i.e., any type) and any name. the names of the child
> nodes however must be unique.
> 
>     [foo]
>       + bar (nt:base) multiple
> 
> declares a node type 'foo' which can have any number of child nodes
> named 'bar'. so called same-name-sibling nodes are distinguished by
> an 1-based index.
> 
>     [foo]
>       + bar (nt:base)
> 
> declares a node type 'foo' which can have 0 or 1 child node
> named 'bar'.
> 
> cheers
> stefan
> 
>> Regards,
>> kalyan
>>
>>
>> Stefan Guggisberg wrote:
>> >
>> > hi kalyan
>> >
>> > On 5/10/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
>> >>
>> >> May sound stupid, but is there a way to define a nodetype that can
>> have
>> >> any
>> >> no. of child nodes?
>> >
>> > just specify '*' as the name in the child node definition.
>> > nt:unstructered is an example
>> > for a such a node type.
>> >
>> > cheers
>> > stefan
>> >
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10414651
>> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10426412
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10636985
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Any number of child nodes?

Posted by Stefan Guggisberg <st...@gmail.com>.
On 5/11/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
>
> Thanks a lot, I misunderstood the '*' for any name.

'*' does stand for any name, maybe i misunderstood your question ;)

a few examples:

    [foo]
      + * (nt:base)

declares a node type 'foo' which can have any number of child nodes
of type 'nt:base' (i.e., any type) and any name. the names of the child
nodes however must be unique.

    [foo]
      + bar (nt:base) multiple

declares a node type 'foo' which can have any number of child nodes
named 'bar'. so called same-name-sibling nodes are distinguished by
an 1-based index.

    [foo]
      + bar (nt:base)

declares a node type 'foo' which can have 0 or 1 child node
named 'bar'.

cheers
stefan

> Regards,
> kalyan
>
>
> Stefan Guggisberg wrote:
> >
> > hi kalyan
> >
> > On 5/10/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
> >>
> >> May sound stupid, but is there a way to define a nodetype that can have
> >> any
> >> no. of child nodes?
> >
> > just specify '*' as the name in the child node definition.
> > nt:unstructered is an example
> > for a such a node type.
> >
> > cheers
> > stefan
> >
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10414651
> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10426412
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Any number of child nodes?

Posted by Kalyan Sarkar <ka...@yahoo.co.in>.
Thanks a lot, I misunderstood the '*' for any name.
Regards,
kalyan


Stefan Guggisberg wrote:
> 
> hi kalyan
> 
> On 5/10/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
>>
>> May sound stupid, but is there a way to define a nodetype that can have
>> any
>> no. of child nodes?
> 
> just specify '*' as the name in the child node definition.
> nt:unstructered is an example
> for a such a node type.
> 
> cheers
> stefan
> 
>> --
>> View this message in context:
>> http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10414651
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10426412
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Any number of child nodes?

Posted by Stefan Guggisberg <st...@gmail.com>.
hi kalyan

On 5/10/07, Kalyan Sarkar <ka...@yahoo.co.in> wrote:
>
> May sound stupid, but is there a way to define a nodetype that can have any
> no. of child nodes?

just specify '*' as the name in the child node definition.
nt:unstructered is an example
for a such a node type.

cheers
stefan

> --
> View this message in context: http://www.nabble.com/Any-number-of-child-nodes--tf3722026.html#a10414651
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>