Using XML and XSLT file paths in Document Transformation Scenario
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 4
- Joined: Thu Apr 22, 2021 11:58 am
Using XML and XSLT file paths in Document Transformation Scenario
I would like to set parameter for both user XML and XSLT files in Document Transformation Scenario.
Like in the situation below.
I read I and try to use https://www.oxygenxml.com/doc/versions/ ... ables.html but I could not find the answer.
Like in the situation below.
Document Transformation Scenario .jpg
Using ${cf} only helps my with one file. I would like to work with both of them dynamically.I read I and try to use https://www.oxygenxml.com/doc/versions/ ... ables.html but I could not find the answer.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Using XML and XSLT file paths in Document Transformation Scenario
Hello,
When you create a transformation scenario, you can use the editor variables such as ${cf} to specify dynamically the input XML or XSL. This means that you can use the same scenario for multiple files, and the editor variables will be expanded to the current file on which you apply the scenario.
But you can apply the scenario on the XML or on the XSL document, therefore you can use an editor variable such as ${cf} either to specify the input XML or the input XSL.
The other input (in your case the XSL) can be specified dynamically to the current file (in your case the XML), but you need to set maybe a different extension. For example you can use ${cfdu}/${cfn}.xsl, in case the XSL input has the same name as the XML input. You can use also ${xpath_eval(expression)} to process the input file name,
I don't know exactly you uses-case, and if the name of the input XML can be used also the input XSL. Maybe you can give me more details.
Another solution can be to define a custom editor variable. To create an editor variable, open the Preferences dialog box (Options > Preferences) and go to Custom Editor Variables. You can find more details in our user manual:
https://www.oxygenxml.com/doc/versions/ ... ables.html
Best Regards,
Octavian
When you create a transformation scenario, you can use the editor variables such as ${cf} to specify dynamically the input XML or XSL. This means that you can use the same scenario for multiple files, and the editor variables will be expanded to the current file on which you apply the scenario.
But you can apply the scenario on the XML or on the XSL document, therefore you can use an editor variable such as ${cf} either to specify the input XML or the input XSL.
The other input (in your case the XSL) can be specified dynamically to the current file (in your case the XML), but you need to set maybe a different extension. For example you can use ${cfdu}/${cfn}.xsl, in case the XSL input has the same name as the XML input. You can use also ${xpath_eval(expression)} to process the input file name,
I don't know exactly you uses-case, and if the name of the input XML can be used also the input XSL. Maybe you can give me more details.
Another solution can be to define a custom editor variable. To create an editor variable, open the Preferences dialog box (Options > Preferences) and go to Custom Editor Variables. You can find more details in our user manual:
https://www.oxygenxml.com/doc/versions/ ... ables.html
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Thu Apr 22, 2021 11:58 am
Re: Using XML and XSLT file paths in Document Transformation Scenario
HI Tavy, thanks for answer.
My main problem is to not have to hardcoded the file name. The names change I don't want to set them every time.
I would like to have opportunity to dynamically choose the files from the oxygen.
Like with the select boxes above.
The best solution I think would be opportunity to use:
${dbgXML} - The local file path to the XML document that is currently selected in the Debugger source combo box (for tools started from the XSLT/XQuery Debugger).
${dbgXSL} - The local file path to the XSL/XQuery document that is currently selected in the Debugger stylesheet combo box (for tools started from the XSLT/XQuery Debugger).
By - https://www.oxygenxml.com/doc/versions/ ... ables.html
But they don't work with scenario, maybe custom editor variable is an answer.
My main problem is to not have to hardcoded the file name. The names change I don't want to set them every time.
I would like to have opportunity to dynamically choose the files from the oxygen.
Like with the select boxes above.
The best solution I think would be opportunity to use:
${dbgXML} - The local file path to the XML document that is currently selected in the Debugger source combo box (for tools started from the XSLT/XQuery Debugger).
${dbgXSL} - The local file path to the XSL/XQuery document that is currently selected in the Debugger stylesheet combo box (for tools started from the XSLT/XQuery Debugger).
By - https://www.oxygenxml.com/doc/versions/ ... ables.html
But they don't work with scenario, maybe custom editor variable is an answer.
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: Using XML and XSLT file paths in Document Transformation Scenario
Hello,
The ${dbgXML} and ${dbgXSL} were implemented as editor variables to be used in External Tools. They resolve to the selected XML and XSL/XQuery from the Debugger perspectives.
There is an issue on our internal issue tracker to support them also in the transformation scenario. I added your comment on the issue and increased its priority. We will update this thread when the i0ssue will be solved.
Thanks for your feedback.
Best Regards,
Octavian
The ${dbgXML} and ${dbgXSL} were implemented as editor variables to be used in External Tools. They resolve to the selected XML and XSL/XQuery from the Debugger perspectives.
There is an issue on our internal issue tracker to support them also in the transformation scenario. I added your comment on the issue and increased its priority. We will update this thread when the i0ssue will be solved.
Thanks for your feedback.
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
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