Stylesheet that worked in FM11 throwing up issues with FM2015
Morning all,
I've been trying to do setup stuff for 2015 for importing XMLs (up until now i've just been playing around with existing books in 2015) and i'm getting some issues with the stylesheet trhowing up errors, some of them are mapping/linking dtd locations but i'm not too fussed on them. one i've got thats causing me a bit of issue is:
XSLT Processor Messages
Fatal Error at file C:\AM\Application\OG-Import.xsl, line 1438, char -1, Message: Arithmetic operator is not defined for arguments of types (xs:string, xs:decimal)
Arithmetic operator is not defined for arguments of types (xs:string, xs:decimal)
The section is question being:
<xsl:template name="Get-size">
<xsl:param name="length"/>
<!-- Get the number part by blanking out the units part and discarding white space. -->
<!--xsl:variable name="number" select="normalize-space(translate($length, '+-0123456789.abcdefghijklmnopqrstuvwxyz', '+-0123456789.'))"/-->
<xsl:variable name="number" select="normalize-space(translate($length, '+-0123456789 abcdefghijklmnopqrstuvwxyz', '0123456789'))"/> (Offending article)
<!-- Get the units part by blanking out the width part and discarding white space. -->
<xsl:variable name="units" select="normalize-space(translate($length, 'abcdefghijklmnopqrstuvwxyz+-0123456789.', 'abcdefghijklmnopqrstuvwxyz'))"/>
<!-- Output the length, translated into mm -->
<xsl:variable name="length-in-mm">
<xsl:choose>
<xsl:when test="$units='cm'">
<xsl:value-of select="$number * 10"/>
</xsl:when>
<xsl:when test="$units='mm'">
<xsl:value-of select="$number"/>
</xsl:when>
<xsl:when test="$units='in'">
<xsl:value-of select="$number * 25.4"/>
</xsl:when>
<xsl:otherwise>
<!--Assume 300dpi for pixels -->
<xsl:value-of select="$number * 25.4 div 300"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="format-number($length-in-mm, '#.00')"/>
</xsl:template>
The xsl is a carryover from what previous author used so i didn't create it, but this is the exact xsl being referenced for import in my FM11, and just works. as far as i can tell, any other import stuff is also identical between the two so, um, help?
As a stop gap, as i'm sorting out with finance to fund the full license, when i upgrade to the full 2015, does that remove my 11 license, as in the interim i can create books in 11 and work on them in 2015. not the ideal solution, but going to be a bit stuck otherwise. Dare say the style sheet could do with an update but as i've not done one before that may take some time.
Cheers
