xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] more on Using apply-templates instead of for-each?


Subject: [xsl] more on Using apply-templates instead of for-each?
From: "Kathy Burke" <Kathy_Burke@xxxxxxxxx>
Date: Tue, 15 Apr 2003 14:09:27 -0400

Please remember: newbie!

I know Wendell's right about using apply-templates instead of for-each but
I've been trying to change my structure without success...would appreciate
knowing how I could adjust the following template to accomplish it using
apply-templates...Many thanks.  Kathy

***I'm just trying to put each numbered <listitem> (child of
safety/numbered_list) into a table row***

<xsl:template match="safety">		
	<table border="1" width="100%" cellpadding="4">			
		<tr bgcolor="red" valign="bottom">

			<th align="left">

				<h3>SAFETY</h3>				
			</th>			
		</tr>			
			<xsl:for-each select="numbered_list/listitem">

		<tr>					
			<td>						
				<xsl:number level="multiple" format="1. "
count="listitem" />
<xsl:value-of select="." />					
			</td>				
		</tr>			
			</xsl:for-each>		
		</table>		
		<br />	
	</xsl:template>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor