jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maksims Zizkuns <maksims_zizk...@exigengroup.lv>
Subject XPath and Whitespaces
Date Thu, 01 Mar 2007 10:27:24 GMT

Hello,
Can somebody explain please: can really Node name contain whitespaces when
querying by XPath?

Here is what I can't understand:

JSR-170 states that:
      1) Part 6.4.3  "Escaping of names": "for document view serialization,
each content repository
                  name is converted to a valid XML name (as defined by XML
1.0)
                  by translating invalid characters into escaped numeric
entity encodings5."

      2) Part 6.6.1 "XPath over Document View" :  "When an XPath query is
executed, the XPath expression specified is applied to the document view of
the workspace being searched."

      3) Part 6.6.6.1/6.6.6.2 is an XPath grammar which states that
NameTest is a QName test but QName is referred as one defined on
http://www.w3.org/TR/REC-xml-names/#NT-QName


Now, from my point of view all said above means that non-escaped
whitespaces aren't allowed in a node name in XPath query.

However Jackrabbit TCK test
org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test
feels good executing XPath like: /jcr:root/testdata/custom sample nodes
/test:refTargetNode/jcr:deref(@jcr:versionHistory,
'h6bd9fd75-77db-470a-99d9-94a22f3c280a')

So, the question actually is who is right? TCK or JSR-170
or I missunderstood JSR-170 and there is no contradictions with TCK?

Thank you
Maks


Mime
View raw message