jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Xpath query based on dynamic property name
Date Fri, 24 Oct 2008 11:42:06 GMT
Hi,

iapilgrim wrote:
> Hi all,
> I'm developing a Tagging system for blog application
> /blogsystem/
> ..../posts
> ......../entry_1 (1)
> 
> /blogsystem/
> ..../tags
> ......../tag1 (2)
> ............./tags
> ................+xxx = [/blogsystem/posts/entry_1,/blogsystem/posts/entry_2]
> (3)
> ................+yyy = [/blogsystem/posts/entry_1] 
> ......../tag2 
> ............./tags
> ................+xxx = [/blogsystem/posts/entry_1,/blogsystem/posts/entry_2] 
> (4)
> ................+zzz = [/blogsystem/posts/entry_1] 
> where
> (1) name of post
> (2) name of tag
> (3) Each tag value is weakly refer to many posts by path
> (4) I have duplication here but don't know how to remove.
> My questions:
> + How to query posts by a tag? 
> Because xxx,yyy,zzz are dynamic properties so I don't know how to query
> based on dynamic property name.

I'm not sure I understand your use case. What exactly do you mean with 'query
posts by a tag'? If you know the tag you can simply traverse the tree and
collect the paths that reference the entries. but I guess that's not what you
want...

> + (jcrom users): Suppose I get all tags by their property name. Because I
> allow query on partial property name (ex. x instead of xxx), I can't find a
> smart way to get property values.
> + Is there other way to organize a similar structure to easily query ?

as an alternative you may want to consider reversing the references. let the
entries reference the tags. maybe that makes it easier for your to formulate the
queries?

regards
 marcel

> I'd appreciate your helps.
> Thank you,
> Van
> 


Mime
View raw message