Subject: RE: [xsl] Creating List with xsl:function From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx> Date: Sat, 18 Nov 2006 08:10:59 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Creating List with xsl:fu, Michael Kay | Thread | RE: [xsl] Creating List with xsl:fu, Michael Kay |
RE: [xsl] XQuery and XSLT, Geert Josten | Date | [xsl] Looking for some basic guidan, Irum Rauf |
Month |