[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Creating List with xsl:function

Subject: RE: Creating List with xsl:function
From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx>
Date: Sat, 18 Nov 2006 08:10:59 -0500
phil vallone
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.