XSLT transformation: Using editor variable in XSL URL
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
XSLT transformation: Using editor variable in XSL URL
Post by Frank Ralf »
Hi,
I want to us an oXygen editor variable in a XSLT transformation for providing a relative path to the XSLT file, like so:
However, I get an error message: "You need a valid XSL URL as input", so only absolute paths seem to work:
Is this a bug or am I missing something?
Kind regards,
Frank
I want to us an oXygen editor variable in a XSLT transformation for providing a relative path to the XSLT file, like so:
Code: Select all
${frameworks}/custom_xslt/my.xsl
Code: Select all
file:/T:/absolute/path/to/my.xsl
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: XSLT transformation: Using editor variable in XSL URL
Hi Frank,
${frameworks} editor variable is expanded to an URL that indicates the frameworks directory from the Oxygen XML Editor installation folder.
Unfortunately, we cannot reproduce this issue on our side as the "You need a valid XSL URL as input" message is obtained only if the XSL URL field is empty.
Could you please specify what version of oXygen are you using and please send us a screenshot with the "edit scenario" dialog? Please send it to our support email address: support AT oxygenxml DOT com.
Regards,
Ionela
${frameworks} editor variable is expanded to an URL that indicates the frameworks directory from the Oxygen XML Editor installation folder.
Unfortunately, we cannot reproduce this issue on our side as the "You need a valid XSL URL as input" message is obtained only if the XSL URL field is empty.
Could you please specify what version of oXygen are you using and please send us a screenshot with the "edit scenario" dialog? Please send it to our support email address: support AT oxygenxml DOT com.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: XSLT transformation: Using editor variable in XSL URL
Post by Frank Ralf »
Hi Ionela,
Sorry for the late reply. I will try to reproduce the error and give you more details.
Kind regards,
Frank
Sorry for the late reply. I will try to reproduce the error and give you more details.
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: XSLT transformation: Using editor variable in XSL URL
Post by Frank Ralf »
Hi,
I found out that I have to prepend the XSL URL with "file:/" to make it work with an environment variable, like so (oXygen 15.2):
I find this rather unintuitive considering the fact that for the XML URL field the plain variable "${currentFileURL}" is enough.
Kind regards,
Frank
I found out that I have to prepend the XSL URL with "file:/" to make it work with an environment variable, like so (oXygen 15.2):
Code: Select all
file:/${env(DITA_XML_DIR)}/xslt/my_custom.xsl
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: XSLT transformation: Using editor variable in XSL URL
Frank,
Oxygen relies heavily on URLs as opposed to the more commonly used file paths. If your environment variable contains a file/directory path, you do have to adjust it to be a URL for the fields that require it in that form, like XML URL and XSL URL.
${currentFileURL} always expands to a URL that points to the current edited file, while an environment variable can expand to anything, from a simple name or value to a file/folder path or even a URL (less likely though).
Note that Oxygen even provides two sets of editor variables, one that expands to URLs (e.g. ${pdu} - project directory URL) and one that expands to regular file/folder paths (e.g. ${pd} - project directory). Only one of the two sets is usually available in a field depending on the type of value accepted by that field. There are also common editor variables that provide simpler values which have to be composed in the appropriate form for that field, such is the case of ${env()}, ${system()}, ${date()}.
Regards,
Adrian
Oxygen relies heavily on URLs as opposed to the more commonly used file paths. If your environment variable contains a file/directory path, you do have to adjust it to be a URL for the fields that require it in that form, like XML URL and XSL URL.
${currentFileURL} always expands to a URL that points to the current edited file, while an environment variable can expand to anything, from a simple name or value to a file/folder path or even a URL (less likely though).
Note that Oxygen even provides two sets of editor variables, one that expands to URLs (e.g. ${pdu} - project directory URL) and one that expands to regular file/folder paths (e.g. ${pd} - project directory). Only one of the two sets is usually available in a field depending on the type of value accepted by that field. There are also common editor variables that provide simpler values which have to be composed in the appropriate form for that field, such is the case of ${env()}, ${system()}, ${date()}.
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: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: XSLT transformation: Using editor variable in XSL URL
Post by Frank Ralf »
Hi Adrian,
Many thanks for this thorough explanation!
Kind regards,
Frank
Many thanks for this thorough explanation!
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.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