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

AW: <xsl:for-each> not working...

Subject: AW: <xsl:for-each> not working...
From: Markus Abt <abt@xxxxxxxx>
Date: Wed, 16 Jul 2003 12:15:56 +0200
xsl for each contains
Hello John,

assuming all inputs are descendants of one single
<HSDataContainerType list="true" name="Inputs" ...> and the same for
outputs, consider using three templates instead of one:

<xsl:template match="HSDataContainerType[contains(@name, 'Inputs']">
  <!-- HTML output for "Inputs" heading comes here -->
</xsl:template>

<xsl:template match="HSDataContainerType[contains(@name, 'Outputs']">
  <!-- HTML output for "Outputs" heading comes here -->
</xsl:template>

<xsl:template match="HSDataContainerType">
  <!-- HTML output for fields that are not headings comes here -->
</xsl:template>


Regards,
Markus
__________________________
Markus Abt
Comet Computer GmbH
http://www.comet.de



----------
Von: 	John Liebermann
Gesendet: 	Samstag, 16. August 2003 00:52
An: 	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Betreff: 	RE:  <xsl:for-each> not working...

[...]

I was using a for-each loop with ancestor::* to clearly display the path to
each field. That works perfect. The problem is that i don't process Inputs
and Outputs separetely. They are both of <HSDataContainer> type so i use :
--------------------------------------------
<xsl:template match="HSDataContainerType">
  <xsl:choose>
	<xsl:when test="contains(@name, 'Inputs')">
		<img src="dcopenicon.gif">
		<a href="#in"><b><xsl:value-of select="@name"/></b></a></img>
		<div style="margin-left: 3em;">
		<xsl:apply-templates select="*"/></div>
	</xsl:when>

. exactly the same for 'Outputs'
--------------------------------------------

[...]

 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.