|
Rank: Newbie
Joined: 8/13/2013 Posts: 2 Location: Victoria
|
I have XSL generated that calls Code:generate-auto-number:
Code:<xsl:variable name="var6_resultof_auto_number" as="xs:integer" select="ns0:generate-auto-number('a', xs:integer('1'), xs:integer('1'), xs:string($var71_idx))"/>
This is defined here Code:xmlns:ns0="https://www.altova.com/xslt-extensions"
The XSL is being ran through Saxon and it's throwing up on that call:
Code:Error at xsl:variable on line 966 column 73 of DetPersonSearchResults-to-MemberArray.xslt: XPST0017 XPath syntax error at char 0 on line 966 near {...r('1'), xs:string($var71_id...}: Cannot find a matching 4-argument function named ://www.altova.com/xslt-extensions}generate-auto-number()
(last line)
How Can I get this to work? I have not been able to find these functions anywhere, it seems they're in the Altova ether, hidden from human hands.
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
Hi rternier,
You will probably have to provide your mapping here.
I used the auto-number in a few xslt generated mappings and cannot recall any trouble with it
|
|
Rank: Newbie
Joined: 8/13/2013 Posts: 2 Location: Victoria
|
ultrabeet wrote:Hi rternier,
You will probably have to provide your mapping here.
I used the auto-number in a few xslt generated mappings and cannot recall any trouble with it
I think I know the reason - we're using Saxon's HE version, which doesn't contain Schema Aware functionality. My xslt is also 5k lines long and contains a few proprietary pieces of information I can't share.
On this though, how would one run XSLT that requires functions like this on a platform that has no internet connectivity?
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
rternier wrote:
I think I know the reason - we're using Saxon's HE version, which doesn't contain Schema Aware functionality. My xslt is also 5k lines long and contains a few proprietary pieces of information I can't share.
On this though, how would one run XSLT that requires functions like this on a platform that has no internet connectivity?
rternier, I used saxon9he in my project as well... no errors whatsoever
|
|
Rank: Member
Joined: 5/20/2015 Posts: 12 Location: Piła
|
I have the same problem with the function: generate-auto-number.
First of all I generated XSLT for World 2007. There is some phrase like that: .............. <xsl:variable name="tempValue" as="xs:string" select="altova:map-preview-filepath( concat( $SV_GeneratedFileNamePrefix, '_SVGeneratedImage', '_', altovaext:generate-auto-number( 'sv_generatedimage', 1, 1, '' ), '.png' ) )"/> <xsl:sequence select="$tempValue"/> <xsl:if test="not( string( $tempValue ) )"> <xsl:message select="'Error: generated file name is empty.'" terminate="yes"/> </xsl:if> .............
Then in the Visual Studio with the help of Saxon I made a following fragment of code:
Processor saxonProcessor = new Processor(); XdmNode input = saxonProcessor.NewDocumentBuilder().Build(new Uri(xmlPath)); XsltTransformer transformer = saxonProcessor.NewXsltCompiler().Compile(new Uri(xsltPath)).Load();
And I receive error like this:
"Cannot find a function a matching 4-argument named (.........) generate-auto-number()"
Can somebody help with this?
|
|
Rank: Advanced Member
Joined: 12/13/2005 Posts: 2,856 Location: Mauritius
|
If you read your own posting you will see the answer. The highlighted function generate-auto-number is an Altova extension to XSLT standard, therefore you cannot expect a non-Altova engine Saxon to know it. Use Altova RaptorXML to execute your XSLT.
|
|
Rank: Member
Joined: 5/20/2015 Posts: 12 Location: Piła
|
Thanks for the request. It's strange because other altova's functions Saxon can see, like: "altovaext:get-width-and-height-from-image-data" or "altovaext:get-base-output-uri". There is only problem with the "generate-auto-number". Ok, I will try this Raptor :)
|
|
guest |