Hi, Michael

Thank you for your reply and suggestion.
I used the standard XPath function xs:base64Binary() instead of Base64BinaryValue, and I got anticipated result.
And, the function saxon:base64Biary-to-string also works completely.

Kazuyuki Kuwano
k.quwano@gmail.com


2011/10/31 Michael Kay <mike@saxonica.com>
I'm not sure why this is failing.

You don't need an extension function to create a base64Binary value from
a string: I would suggest using the standard XPath constructor function

<xsl:variable name="b64" select="xs:base64Binary(PS)" as="xs:base64Binary"/>

If you then get a failure on the saxon:base64Binary-to-string call, this would suggest that Saxon isn't picking up the license file. There are hints on diagnosing license file problems at http://www.saxonica.com/documentation/about/installationjava/licensefaq.xml

Michael Kay
Saxonica



On 29/10/2011 07:34, 桑野 和行 wrote:
> Hi,
> I'm using SaxonPE9-3-0-5j(build042114) with license file and I have a trouble.
>
> Xml file I want to process is contains elements whose content is base64 encoded strings, and I want to decode base64 strings and take out decoded strings as files.
>
> Xml file is as follows.
> ----------
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <PS>JSFQUy1BZG9 (base64 encoded strings. so very long, I omit middle) UlRU9GDQ==</PS>
> </root>
> ----------
>
> Xslt file I wrote is as follows.
> ---------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" xmlns:b64="net.sf.saxon.value.Base64BinaryValue" xmlns:saxon="http://saxon.sf.net/">
> <xsl:template match="/">
> <xsl:apply-templates/>
> </xsl:template>
> <xsl:template match="root">
> <xsl:variable name="b64" select="b64:new(string(PS))"/>
> <xsl:result-document href="foo.eps" method="text">
> <xsl:value-of select="saxon:base64Binary-to-string($b64,'UTF8')"/>
> </xsl:result-document>
> </xsl:template>
> </xsl:stylesheet>
> ---------
>
> I executed command as follows on Windows command prompt.
> java -cp (path of saxon9pe.jar file) net.sf.saxon.Transform -s:(path of xml file) -xsl:(path of xslt file)
>
> But, process failed and I've got an error message as follows.
> Cannot find a matching 1-argument function named {net.sf.saxon.value.Base64BinaryValue}new()
> I guess generating constructor of Base64BinaryValue class is failing.
>
> I've changed command to
> java -jar (path to jar file) -s:(path of xml) -xsl:(path of xslt)
> but, result was same.
>
> And, strangely, when I process above-mentioned xml and xslt files with saxonPE9-3-0-5 on<oXygen/>13 Transformation Scenario, they DO WORK completely.
>
> In addition, OS is Windows7,  java version is 1.6.0_25 and I confirmed that a license file of saxson  is effective.
>
> Thanks,
> Kazuyuki Kuwano
> k.quwano@gmail.com
>
> ------------------------------------------------------------------------------
> Get your Android app more play: Bring it to the BlackBerry PlayBook
> in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
> for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
> it is! http://p.sf.net/sfu/android-dev2dev
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help