Will,

Is there a default namespace at play? You can check by adding: 

xdmp:log(text{"NS=", namespace-uri(<cts:elem/>)})

to your module. Similarly, you can check the database by logging 

xdmp:database-name(xdmp:database()) 

to ensure the app server is looking at the data you think it is.

Yours,
Damon

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Will Thompson
Sent: Tuesday, May 10, 2011 3:05 PM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Node selector xpath not working

doc("/config/config-file.xml")//some-element

CQ returns the expected elements, but the same query executed through the app 
server returns empty.  Same content source.  This is how I had to work around 
it in my app:

doc("/config/config-file.xml")//node()[name(.)="some-element"]

I don't see why one would work and not the other.  It's not a show stopper, but 
it's definitely bizarre.  Any ideas about what could be going on?

Thanks,

Will
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to