RE: [xsl] Creating List with xsl:function

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:template match="ACM:list">
		<xsl:for-each select="ACM:Para">
				<xsl:number format="{ACM:list-format(.)}"/>
				<xsl:text>. </xsl:text>

<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>

Thanks again!


Current Thread