Hi
I need some help getting across the line calling a function in XSLT ...
Now i am using
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
i.e. v1 but can use if v2 if needed.
I was looking for a "pad left" function but did not find an inbuilt one but found code on google
<!-- At end of XSLT - tried both before and after closing stylesheet
-->
<xsl:function name="functx:pad-string-to-length" as="xs:string" xmlns:functx="http://www.functx.com" ><xsl:param name="stringToPad" as="xs:string?"/><xsl:param name="length" as="xs:integer"/><xsl:sequence select="substring(string-join (($stringToPad, for $i in (1 to $length) return ' ') ,'') ,1,$length)"/></xsl:function>
I tried with this before and after the ending </xsl:stylesheet> but no joy
<xsl:value-of select="functx:pad-string-to-length(<xsl:value-of select="@outcome" />, 10)" />
i.e. i want to get the value from XML and blank fill to X chars the field value.
<xsl:value-of select="@outcome" /> in the line before this works, however i don't think i have the syntax right,
or the format for the function correct.
>> Tips ?
Thanks