Page 1 of 1

XSLT import files

Posted: Wed Jun 29, 2011 12:45 am
by r22
How to disable checking files' location?

Re: XSLT import files

Posted: Wed Jun 29, 2011 6:59 am
by george
What do you mean?
In case an import refers to a location where you do not have that XSLT then you can use an XML Catalog to map that URI to another one that points to the respective XSLT file.

Best Regards,
George

Re: XSLT import files

Posted: Wed Jun 29, 2011 6:47 pm
by r22
I want to turn off the checking if file exist or not
for ex. <xsl:import href="file.xsl"/>

Re: XSLT import files

Posted: Wed Jun 29, 2011 7:13 pm
by george
You cannot turn that checking off, none of the existing XSLT processors offer such an option.
However, as I said before, you can have a catalog mapping that to an empty stylesheet. In your case you can use the support for resolving a resource based on a suffix, like below:

Code: Select all


<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uriSuffix uriSuffix="file.xsl" uri="empty.xsl"/>
</catalog>
and have an empty XSLT file next to the catalog named empty.xsl

Code: Select all


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

</xsl:stylesheet>
then set this catalog file as an XML catalog in oXygen Options->Preferences -- XML / XML Catalog.

Best Regards,
George

Re: XSLT import files

Posted: Wed Jun 29, 2011 8:34 pm
by r22
thank you for explanation

even if I just type code in XSLT-editor and don't apply transformation (ie do not use XSLT processors)?
It looks like spell-checking (red wavy line)

Re: XSLT import files

Posted: Wed Jun 29, 2011 10:00 pm
by george
If you do not want to have automatic validation you can disable it from Options->Preferences -- Editor / Document Checking, uncheck the "Enable automatic validation" option.