Subject: [xsl] upgrading Stylesheets From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx> Date: Fri, 6 Apr 2012 09:03:53 +0200 |
Hi, I have a bunch of stylesheets that I want to upgrade from 1.0 to 2.0. So I just changed the version number in the sheet and wanted to debug from there. We have one stylesheet that is imported into all of the stylesheets which imports even more stylesheet where common functions are stored. Now in 1.0 that worked fine. Now all of a sudden I get an error that none of the functions there are found anymore. Example: Call a function: <xsl:variable name="NormMonth" select="replace(glpc:ReplaceMonthToDigits($Date), ' ')"/> Function: <func:function name="glpc:ReplaceMonthToDigits"> <xsl:param name="date-part" select="/.."/> <func:result select="misc:ReplaceMonthToDigits($date-part)"/> </func:function> It calls nother function which is in a different stylesheet: <func:function name="misc:ReplaceMonthToDigits"> <xsl:param name="date-part" select="/.."/> <xsl:variable name="RetVal"> <xsl:choose> <xsl:when test="contains($date-part, 'Januar')"> <xsl:value-of select="replace($date-part, 'Januar', '01.')"/> </xsl:when> <xsl:when test="contains($date-part, 'Februar')"> <xsl:value-of select="replace($date-part, 'Februar', '02.')"/> </xsl:when> . . . <xsl:otherwise> <xsl:value-of select="$date-part"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <func:result select="replace($RetVal, '..', '.')"/> </func:function> Now both of the stylesheets are imported in the same stylesheet so they should "find each other" right ? Yet I get this error: XPST0017: XPath syntax error at char 40 on line 282 in {...placeMonthToDigits($Date), ...}: Cannot find a matching 1-argument function named {http://www.linkwerk.com/namespaces/glpcommon}ReplaceMonthToDigits() Any suggestions? Help would be much appreciated. . . . . . . . . . . . . . . . . . . . . . . . . . . Ing. Patrick Szabo XSLT Developer LexisNexis A-1030 Wien, Marxergasse 25 mailto:patrick.szabo@xxxxxxxxxxxxx Tel.: +43 1 53452 1573 Fax: +43 1 534 52 146
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Question on search and re, Wolfgang Laun | Thread | Re: [xsl] upgrading Stylesheets, Michael Kay |
[xsl] for-each-group group-by, Craig Sampson | Date | Re: [xsl] upgrading Stylesheets, Michael Kay |
Month |