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

single HTML tag around repeating patterns

Subject: single HTML tag around repeating patterns
From: "Brad Miller" <Brad.Miller@xxxxxxxxxxx>
Date: Fri, 12 Jul 2002 09:12:52 -0700
single html tags
This is probably one of those really simple things that I just can't seem to grasp today.
I am trying to place a <div> tag around a repeating pattern. Everything I do either gives me a <div> around each subsection or I get none of the subsections and just a <div>.
The div tag below should surround all of my SUBSECTIONs. The way I have it now I get the same div for every subsection.
So how can I get one instance of the div surrounding multiple subsections?

<xsl:template match="PROC/SUBSECTION">
	<div id="procedures" class="procedures" style="display:none">

		<xsl:for-each select="TITLE">
   			<h2><xsl:apply-templates  select = "." /></h2>
 		</xsl:for-each>
	
		<xsl:for-each select="PARA">
   			<p><xsl:apply-templates  select = "." /></p>
 		</xsl:for-each>

 		<ol>
 		<xsl:for-each select="LIST/ITEM-NUMBER">
   			<li><xsl:apply-templates  select = "." /></li>
 		</xsl:for-each>
 		</ol>
	</div>
</xsl:template>

I want my final output to look like this:

<div id="procedures" class="procedures" style="display:none">
<h2>title 1</h2>
<p>paragraph 1</p>
<ol>
	<li>list 1.1</li>
	<li>list 2.1</li>
</ol>
<h2>title 2</h2>
<p>paragraph 2</p>
<ol>
	<li>list 1.2</li>
	<li>list 2.2</li>
</ol>
</div>


Thanks
Brad

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


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.