XSLT import files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
r22
Posts: 4
Joined: Mon Jun 07, 2010 12:52 pm

XSLT import files

Post by r22 »

How to disable checking files' location?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: XSLT import files

Post 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
George Cristian Bina
r22
Posts: 4
Joined: Mon Jun 07, 2010 12:52 pm

Re: XSLT import files

Post by r22 »

I want to turn off the checking if file exist or not
for ex. <xsl:import href="file.xsl"/>
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: XSLT import files

Post 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
George Cristian Bina
r22
Posts: 4
Joined: Mon Jun 07, 2010 12:52 pm

Re: XSLT import files

Post 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)
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: XSLT import files

Post 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.
George Cristian Bina
Post Reply