More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Issues related to W3C XQuery.
-
- Posts: 101
- Joined: Tue Aug 19, 2014 12:04 pm
More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Post by Martin Honnen »
If I have an XML sample containing JSON e.g.
then, in XPath 3.1 or XQuery 3.1 I can write path expressions constructing XML "on the fly" with e.g. expressions like
However, if I do that in the XPath selector input or even in the XPath/XQuery builder and evaluate the expression, the result I get displayed is nothing more like
Is there some way to have the result pane show the actual document e.g.
without using e.g. `!serialize()` additionally in the XPath expression?
I understand the XPath input and XPath/XQuery builder, for paths selecting nodes in the input XML, just highlight the selected nodes in the editor pane so there you can see the visual representation of the result evaluation, but I wonder whether, with XPath 3.1 where we can construct nodes on the fly with json-to-xml and parse-xml/parse-xml-fragment, there shouldn't be some way to see the actually created nodes.
Code: Select all
<root>{
"key": "val"
}</root>
Code: Select all
/root/json-to-xml(.)
Code: Select all
Description: #document
XPath location: /
Code: Select all
<map xmlns="http://www.w3.org/2005/xpath-functions"><string key="key">val</string></map>
I understand the XPath input and XPath/XQuery builder, for paths selecting nodes in the input XML, just highlight the selected nodes in the editor pane so there you can see the visual representation of the result evaluation, but I wonder whether, with XPath 3.1 where we can construct nodes on the fly with json-to-xml and parse-xml/parse-xml-fragment, there shouldn't be some way to see the actually created nodes.
Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Hello Martin,
If you select the Saxon XQuery processor in the XPath/XQuery Builder view and run the /root/json-to-xml(.) expression, you will obtain the actual document in the result.
You can also create an XQuery document containing the /root/json-to-xml(.) expression and run it over the XML document.
Best Regards,
Octavian
If you select the Saxon XQuery processor in the XPath/XQuery Builder view and run the /root/json-to-xml(.) expression, you will obtain the actual document in the result.
You can also create an XQuery document containing the /root/json-to-xml(.) expression and run it over the XML document.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 101
- Joined: Tue Aug 19, 2014 12:04 pm
Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Post by Martin Honnen »
Thanks.
I take it their is currently no way when I do pure XPath (3.1) evaluation?
Of course in the editor it is easy to switch to XQuery but then of course one might write some non XPath expressions in the editor without necessarily noticing while wanting to "develop" some XPath code you later want to feed to a pure XPath API.
Perhaps you can add a feature request.
I take it their is currently no way when I do pure XPath (3.1) evaluation?
Of course in the editor it is easy to switch to XQuery but then of course one might write some non XPath expressions in the editor without necessarily noticing while wanting to "develop" some XPath code you later want to feed to a pure XPath API.
Perhaps you can add a feature request.
Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Hi Martin,
I added an issue on our issue tracker to analyze this situation better. When the issue will be solved we will update this thread.
Thanks again for the feedback.
Best Regards,
Octavian
I added an issue on our issue tracker to analyze this situation better. When the issue will be solved we will update this thread.
Thanks again for the feedback.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 101
- Joined: Tue Aug 19, 2014 12:04 pm
Re: More detailed result view for XPath/XQuery constructing XML on the fly with e.g. json-to-xml
Post by Martin Honnen »
It appears the new release 25 has quite improved, now the result is shown in the results pane as an "unnamed node" with the serialization of e.g.
As far as I am concerned, this is kind of the result display I was looking for. Congrats for introducing this feature in the new release.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<string key="key">val</string>
</map>
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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