IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Errors running generated XSLT when using Altova funtions Options · View
rternier
Posted: Tuesday, August 13, 2013 11:27:54 PM
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.
ultrabeet
Posted: Wednesday, August 14, 2013 12:46:39 AM
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
rternier
Posted: Wednesday, August 14, 2013 5:02:18 PM
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?
ultrabeet
Posted: Wednesday, August 14, 2013 7:52:43 PM
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
Kwolo666
Posted: Wednesday, May 20, 2015 4:12:42 PM
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, &apos;_SVGeneratedImage&apos;, &apos;_&apos;, altovaext:generate-auto-number( &apos;sv_generatedimage&apos;, 1, 1, &apos;&apos; ), &apos;.png&apos; ) )"/>
<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?
vlad
Posted: Thursday, May 21, 2015 8:26:33 AM
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.
Kwolo666
Posted: Thursday, May 21, 2015 8:54:46 AM
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 :)
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.