Hi,
I'd like to share a little thing that took me some time to get it
working, because I couldn't find any useful information searching in google.
My goal: an xpath query to get all the paragraphs with a certain template, but with a binary attribute not null (in other words, with a file element in the dialog and a real file uploaded by the user). The solution ("myTemplate" is the template I'm looking for, and "myAttribute" is the exact name of the file element in the dialog):

//element(*, mgnl:contentNode)[(MetaData/@mgnl:template eq 'myTemplate') and (myAttribute/@jcr:data)]

Obviously it seems simple. The part I didn't know is the possibility
(and the sintax as well) to put conditions on different children of the same node, one for the metadata, and the other for the binary attribute,
which is not a single attribute but another node just like the metadata one.
If you know any better way to do the same thing please tell me, I'm
interested. And sorry if you all already know what I just wrote.

Regards, Danilo.

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to