
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xcpi="http://www.xcpi.com/xfunction" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:variable name="newline" select="'
 ;'"/>
<xsl:function name="xcpi:dup">
<xsl:param name="input" as="xs:string"/>
<xsl:param name="count" as="xs:integer"/>
<xsl:sequence select="string-join(for $i in 1 to $count return $input,'')"/>
</xsl:function>
<xsl:function name="xcpi:padLeft">
<xsl:param name="value" as="xs:string"/>
<xsl:param name="width" as="xs:integer"/>
<xsl:param name="paddingChar" as="xs:string"/>
<xsl:variable name="output" select="substring($value,1,$width)"/>
<xsl:value-of select="xcpi:dup($paddingChar, $width - string-length($output))"/>
<xsl:value-of select="$output"/>
</xsl:function>
<xsl:function name="xcpi:padRight">
<xsl:param name="value" />
<xsl:param name="width" as="xs:integer"/>
<xsl:param name="paddingChar" as="xs:string"/>
<xsl:variable name="output" select="substring($value,1,$width)"/>
<xsl:value-of select="$output"/>
<xsl:value-of select="xcpi:dup($paddingChar, $width - string-length($output))"/>
</xsl:function>
<xsl:value-of select="xcpi:padLeft($ProfitCenter, 32, ' ')"/>
<xsl:value-of select="xcpi:padRight($ProfitCenter, 32, ' ')"/>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xcpi="http://www.xcpi.com/xfunction" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output method="text" encoding="UTF-8" indent="yes"/>
<xsl:variable name="newline" select="'
 ;'"/>
<xsl:template match="/">
<xsl:for-each select="/Articles">
<xsl:value-of select="xcpi:padLeft(ArticleName, 10, ' ')"/>
<xsl:value-of select="xcpi:padRight(ArticleNumber, 15, '0')"/>
<!-- New line -->
<xsl:value-of select="$newline"/>
</xsl:for-each>
</xsl:template>
<!--Utility functions-->
<xsl:function name="xcpi:padRight">
<xsl:param name="value" as="xs:string"/>
<xsl:param name="width" as="xs:integer"/>
<xsl:param name="paddingChar" as="xs:string"/>
<xsl:variable name="output" select="substring($value,1,$width)"/>
<xsl:value-of select="$output"/>
<xsl:value-of select="xcpi:dup($paddingChar, $width - string-length($output))"/>
</xsl:function>
<xsl:function name="xcpi:padLeft">
<xsl:param name="value" as="xs:string"/>
<xsl:param name="width" as="xs:integer"/>
<xsl:param name="paddingChar" as="xs:string"/>
<xsl:variable name="output" select="substring($value,1,$width)"/>
<xsl:value-of select="xcpi:dup($paddingChar, $width - string-length($output))"/>
<xsl:value-of select="$output"/>
</xsl:function>
<xsl:function name="xcpi:dup">
<xsl:param name="input" as="xs:string"/>
<xsl:param name="count" as="xs:integer"/>
<xsl:sequence select="string-join(for $i in 1 to $count return $input,'')"/>
</xsl:function>
</xsl:stylesheet>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |