Hi Tim!

Or you could try something like:

/jcr:root/element("it-works",mgnl:content)

or:

/jcr:root/*[local-name()="it-works"]

or maybe:

/jcr:root/*[@name="it-works"]


In these examples "it-works" is passed as a string rather than as part of the 
path-expression, maybe JCR will swallow it like this?

Regards from Vienna,

Richard


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Rakesh Vidyadharan
Gesendet: Montag, 23. Mai 2011 16:54
An: Magnolia User-List
Betreff: Re: [magnolia-user] Re: XPath woes


I am pretty sure it is because of the - in the node name (not a valid character 
for XML elements, similar to variables in source code).  See 
http://www.mail-archive.com/[email protected]/msg08421.html for an 
explanation.  In these cases an SQL query is easier to work with (which is what 
Magnolia uses internally).

Rakesh

On 23/05/2011 09:24, "Magnolia Forums (on behalf of Tim Shaw)"
<[email protected]> wrote:

>
>Thanks for trying.
>I've tried every combination of '/', '*' and 'it-works' I can imagine, 
>with and without the 'jcr:root'! Nix!
>As I say, the nodes magically appear if I do '//*' - but I cannot get 
>it to give me my 'it-works' Content node unless I use the HierarchyManager.
>I'm wondering if it's something to do with the Context or the User ...
>Thanks anyway
>
>--
>Context is everything:
>http://forum.magnolia-cms.com/forum/thread.html?threadId=803af20d-bbd4-
>489
>0-8697-481935abfce3
>
>
>----------------------------------------------------------------
>For list details see
>http://www.magnolia-cms.com/home/community/mailing-lists.html
>To unsubscribe, E-mail to: <[email protected]>
>----------------------------------------------------------------
>



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





----------------------------------------------------------------
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