jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject RE: DM Rule #4: Beware of Same Name Siblings.
Date Mon, 09 Jul 2007 06:12:31 GMT
Hi Shaun,

In this case, I would add an intermediate collection node:

+ acme:seatList SeatList

+ * acme:Seat

You may then name your acme:Seat nodes however you like, e.g. numbering
them or in a coordinate system or by random number or whatever, without
"polluting" the namespace of the acme:Car node. In this case consider
the acme:SeatList sort of an array of acme:Seat nodes where you are free
to assign indices.


Am Samstag, den 07.07.2007, 15:55 +0100 schrieb sbarriba:
> Hi David et al,
> Interesting comment on SNS.
> Our model includes various SNS and while 'yes' I agree that [1],[2] etc
> aspect can cause problems how else would you model anonymous composition
> where Object A contains multiple instances of Object B, where Object B has
> no unique & distinguishing concept of a name.
> For example,
> [acme:Car]
>  acme:seats multiple acme:Seat
> What would be your preferred way to model the above in a green field model?
> Regards,
> Shaun
> -----Original Message-----
> From: David Nuescheler [mailto:david.nuescheler@gmail.com] 
> Sent: 07 July 2007 12:17
> To: users@jackrabbit.apache.org
> Subject: DM Rule #4: Beware of Same Name Siblings.
> Explanation
> ---
> While Same Name Siblings (SNS) have been introduced into the spec to
> allow compatibility with data structures that are designed for and
> expressed through XML and therefore are extremely valuable to JCR, SNS
> come with a substantial overhead and complexity for the repository.
> Any path into the content repository that contains an SNS in one of
> its path segments becomes much less stable, if an SNS is removed or
> reordered, it has an impact on the paths of all the other SNS and
> their children.
> For import of XML or interaction with existing XML SNS maybe necessary
> and useful but I have never used SNS, and never will in my "green
> field" data models.
> Example:
> ---
> Use
> /content/myblog/posts/what_i_learned_today
> /content/myblog/posts/iphone_shipping
> instead of
> /content/blog[1]/post[1]
> /content/blog[1]/post[2]

View raw message