|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Creating List with xsl:function
Thank you for your help. Here is my final solution. I had to change my
template rule for the desired HTML output.
<xsl:function name="ACM:list-format" as="xs:string">
<xsl:param name="node" as="node()"/>
<xsl:sequence select="('1', 'a', 'i', 'A', 'I')
[count($node/ancestor::ACM:Para) mod 5 + 1] "/>
</xsl:function>
<xsl:template match="ACM:list">
<xsl:for-each select="ACM:Para">
<ol>
<xsl:number format="{ACM:list-format(.)}"/>
<xsl:text>. </xsl:text>
<xsl:apply-templates/>
</ol>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<ol>a. start</ol>
<ol>b. 2nd
<ol>i. list it</ol>
<ol>ii. going</ol>
<ol>iii. 3rd
<ol>A. And on
<ol>I. somemore
<ol>1. More</ol>
</ol>
</ol>
</ol>
</ol>
Thanks again!
Phil
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








