question about XPath builder view
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 102
- Joined: Tue Aug 19, 2014 12:04 pm
question about XPath builder view
Post by Martin Honnen »
I am currently evaluating oXygen 16.0 and I have a question about the XPath builder view, it seems to me that code entered there is not treated as pure XPath, for instance when I select "XPath 3.0" as the language and evaluate the code
I would expect the result to be false as in pure XPath the first string has 7 characters and the second only 3. However when I run the code I get the result true. The same happens when selecting XPath 2.0.
Even with XPath 1.0 and the code
I get the result true.
So it seems that the code is not being evaluated as pure XPath code but rather instead perhaps as XQuery code where entity references in string literals have a special meaning. Is that true? Is there a way to have pure XPath evaluation?
Code: Select all
string-length('<&>') eq string-length('<&>')
Even with XPath 1.0 and the code
Code: Select all
string-length('<&>') = string-length('<&>')
So it seems that the code is not being evaluated as pure XPath code but rather instead perhaps as XQuery code where entity references in string literals have a special meaning. Is that true? Is there a way to have pure XPath evaluation?
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: question about XPath builder view
Hi,
It's not pure XPath because by default it expands predefined entity references ('&' becomes simply '&'). This explains the string length equality for '<&>' and '<&>'.
You can change this behavior by disabling in Options > Preferences, XML > XSLT-FO-XQuery > XPath, the option "Unescape XPath expression".
Regards,
Adrian
It's not pure XPath because by default it expands predefined entity references ('&' becomes simply '&'). This explains the string length equality for '<&>' and '<&>'.
You can change this behavior by disabling in Options > Preferences, XML > XSLT-FO-XQuery > XPath, the option "Unescape XPath expression".
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service