Hi Chris,

try

//*[jcr:contains(issue, 'news')]


Ralf

Allan, CJ (Chris) schrieb:
Hi,

Another question about XPath I'm afraid (still slightly confused).

I have a query: //issue[jcr:contains(., 'news')]

Which returns:
/untitled0/mainColumnParagraphs/0/issue
/untitled0/mainColumnParagraphs/01/issue
/topics/mainColumnParagraphs/05/issue
/topics/mainColumnParagraphs/010/issue
/topics/mainColumnParagraphs/011/issue

However, I would like to get the parent of each of these results i.e.

/untitled0/mainColumnParagraphs/0
/untitled0/mainColumnParagraphs/01
/topics/mainColumnParagraphs/05
/topics/mainColumnParagraphs/010
/topics/mainColumnParagraphs/011

I'm not sure what query I need to get this. I've been looking at the
parent axis, and trying it with no luck.

As a test example, executing the query 'parent::*' and 'child::*' gives
the same results - what looks like the children of the 'current node'
e.g. /untitled0, /topics

All help gretly appreciated!

Chris


----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------

Reply via email to