Local recources and XSLT
Here should go questions about transforming XML with XSLT and FOP.
Local recources and XSLT
I've used Visual Studio for editing / debugging XSLTs but found Oxygen more friendly.
But I cannot use local resources via importing them to XSLT using Oxygen:
Oxygen throw next error:
E [Saxon6.5.5] Malformed URL C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Settings\StandardBlaBlaBlaXSLTFile.xslt(base file:/C:/Work/Test.xslt) - unknown protocol: c
It works fine when I put StandardBlaBlaBlaXSLTFile.xslt file to my C:/Work folder (near to tested Test.xslt) and include it via:
But this way is not acceptable for me.
Is there any way to include local XSLT resources to Project (or globally to any XSLT that will be edited in Oxygen)?
But I cannot use local resources via importing them to XSLT using Oxygen:
Code: Select all
<xsl:import href="C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Settings\StandardBlaBlaBlaXSLTFile.xslt"/>
E [Saxon6.5.5] Malformed URL C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Settings\StandardBlaBlaBlaXSLTFile.xslt(base file:/C:/Work/Test.xslt) - unknown protocol: c
It works fine when I put StandardBlaBlaBlaXSLTFile.xslt file to my C:/Work folder (near to tested Test.xslt) and include it via:
Code: Select all
<xsl:import href="StandardBlaBlaBlaXSLTFile.xslt"/>
Is there any way to include local XSLT resources to Project (or globally to any XSLT that will be edited in Oxygen)?
Re: Local recources and XSLT
Hello,
Please note that as per xsl:import specification the href attribute value should be a URI reference (absolute URI or relative URI):
http://www.w3.org/TR/xslt#import
A workaround is to use an XML Catalog to map the path of stylesheet that you want to import to an URI.
For example the XML Catalog below maps the stylesheet's path to a relative URI. In this case, you need to save the XML Catalog relative to the path that you are mapping (in the same location with StandardBlaBlaBlaXSLTFile.xslt).
Or you can redirect the path to an absolute URI, and the XML catalog can be saved anywhere else.
After you've created your XML catalog you need to add it to Option -> Preferences -> XML -> XML Catalog.
Let us know if you need further assistance.
Regards,
Ionela
Please note that as per xsl:import specification the href attribute value should be a URI reference (absolute URI or relative URI):
http://www.w3.org/TR/xslt#import
A workaround is to use an XML Catalog to map the path of stylesheet that you want to import to an URI.
For example the XML Catalog below maps the stylesheet's path to a relative URI. In this case, you need to save the XML Catalog relative to the path that you are mapping (in the same location with StandardBlaBlaBlaXSLTFile.xslt).
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI uriStartString="C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Settings\" rewritePrefix="."/>
</catalog>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI uriStartString="C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Settings\" rewritePrefix="file:/C:/Inetpub/wwwroot/wss/VirtualDirectories/80/Settings/"/>
</catalog>
Let us know if you need further assistance.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
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