Subject:Error running on UNIX Author:Tony Lavinio Date:11 Nov 2009 07:58 AM
If you're running the standalone DataDirect XML Converters on Unix,
you might want to open a SupportLink call with DataDirect support so
that the issue is properly tracked.
This forum is limited in scope to Stylus Studio issues.
Subject:Error running on UNIX Author:Tony Lavinio Date:11 Nov 2009 05:23 PM
In order to use the adapter: protocol, you need the XML Converters
that are included with Stylus Studio, or licensed separately for
use outside of Stylus Studio.
and this is in the transform
<jpeg><xsl:value-of select="saxon:string-to-base64Binary($MSDrawingIcon)"/></jpeg>
But I am getting this error
XPST0017: XPath syntax error at char 44 on line 431 in {...o-base64Binary($MSDrawingIc...}:
Cannot find a matching 1-argument function named {http://saxon.sf.net/}string-to-base64Binary()
Failed to compile stylesheet. 1 error detected.
Subject:Error running on UNIX Author:(Deleted User) Date:13 Nov 2009 06:26 AM
Hi Jon,
the Saxon method you are trying to use is not indeed doing the same operation of XML Converters; it will take the *string* and convert it to base64, and not interpreting as a path to a file to be read as a binary stream to be converted. Saxon has the saxon:octets-to-base64Binary() function, but it looks it is missing a function to load a URI as a sequence of octets. If using DataDirect XML Converter is not possible, you should investigate accessing java.io.FileInputStream from the XSLT, or writing an ad-hoc extension function in Java.
Subject:Error running on UNIX Author:(Deleted User) Date:16 Nov 2009 09:50 AM
Hi Jon, going back to your original xslt which contained:
<jpeg><xsl:value-of select="document(concat('adapter:Base-64?',$IconMSDrawing))"/></jpeg>
adapter:Base-64 is part of the Data Direct XML Converters product. If you want to use it on UNIX, you will have to download a copy of the DataDirect XML Converters product and install it on UNIX. Once that is done, you can run your saxon XSLT on unix.
If your xslt contains document("adapter:Base-64?......") then you are asking the xslt processor to use a "URI Resolver" to resolve "adapter:Base-64...."
You will have to register Data Direct XML Converters as the URI Resolver for saxon, using this java code:
com.ddtek.xmlconverters.ConverterFactory factory = new com.ddtek.xmlconverters.ConverterFactory();
transformer.setURIResolver(factory.newResolver());