Xquery transformation scenario
Issues related to W3C XQuery.
-
- Posts: 6
- Joined: Tue Feb 07, 2012 12:59 pm
Xquery transformation scenario
Post by SteffenWeitsch »
Hello,
I want to setup a transformation scenario with xquery.
Filename of generated output file should be dynamic generated by values extracted from actual transformed file.
Can anyone help to configure this ?
Regards
Steffen
I want to setup a transformation scenario with xquery.
Filename of generated output file should be dynamic generated by values extracted from actual transformed file.
Can anyone help to configure this ?
Regards
Steffen
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Xquery transformation scenario
Hello,
Note that the generated output file can only be saved in the local file system (file path).
If you need to use values from the source file in the output file name (in the Save as field from the Output tab of the scenario configuration), you can use an XPath that pinpoints the value from the XML source with the editor variable ${xpath_eval(expression)}.
If you're creating a scenario of type XML transformation with XQuery (from the perspective of the XML as the "current file") you can use ${cfd} (current file directory) and ${cfu} (current file URL) in the Save as field to refer the XML source.
e.g.
Save as: ${cfd}/myfile${xpath_eval(doc('${cfu}')/xpath/to/my/value/text())}.xml
Regards,
Adrian
Note that the generated output file can only be saved in the local file system (file path).
If you need to use values from the source file in the output file name (in the Save as field from the Output tab of the scenario configuration), you can use an XPath that pinpoints the value from the XML source with the editor variable ${xpath_eval(expression)}.
If you're creating a scenario of type XML transformation with XQuery (from the perspective of the XML as the "current file") you can use ${cfd} (current file directory) and ${cfu} (current file URL) in the Save as field to refer the XML source.
e.g.
Save as: ${cfd}/myfile${xpath_eval(doc('${cfu}')/xpath/to/my/value/text())}.xml
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
-
- Posts: 6
- Joined: Tue Feb 07, 2012 12:59 pm
Re: Xquery transformation scenario
Post by SteffenWeitsch »
Hello,
that worked fine, thanks.
One more question - is it also possible to use some xquery functions ?
eg. tokenize(/path/to/my/node[qualifier = 'X'][part = '1']/value/text(), '\|')[1]
Regards
Steffen
that worked fine, thanks.
One more question - is it also possible to use some xquery functions ?
eg. tokenize(/path/to/my/node[qualifier = 'X'][part = '1']/value/text(), '\|')[1]
Regards
Steffen
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Xquery transformation scenario
Hi,
You can only use XPath functions in the expression from ${xpath_eval(expression)}. tokenize is an XPath function (also available in XQuery), so it works.
Regards,
Adrian
You can only use XPath functions in the expression from ${xpath_eval(expression)}. tokenize is an XPath function (also available in XQuery), so it works.
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)
- ↳ 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