This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AW: For loop


Hello Devan,

what do you understand, when you write 'for-loop'?
There isn't a construct for (start;condition;action) like in Java or C++

Infact, what you can do, is do build a loop for the occurrence of
determined elements in the source tree.
For example, to process all <TEMP>-elements in current node do
	<xsl:for-each select="TEMP">
		<xsl:text>This is TEMP-Element with content</xsl:text>
		<xsl:value-of select="."/>
	</xsl:for-each>
If you want to copy your doc use
<xsl:template match="node()|@*">
	<xsl:copy>
		<xsl:apply-templates select="node()|@*" />
	</xsl:copy>
</xsl:match>
If you only want to write out contents use
<xsl:template match="node()|@*">
	<xsl:apply-templates select="node()|@*" />
</xsl:match>

Michael

-----Ursprungliche Nachricht-----
Von: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]Im Auftrag von Devan
Govender
Gesendet: Donnerstag, 12. Juli 2001 12:56
An: xsl-list@lists.mulberrytech.com
Betreff: [xsl] For loop


I would to retrieve the xml data using a for loop
where I go through the elements 1 at a time and print them in this
order.

Any help would be really appreciated
-- 
"I count religion but a childish toy, and hold there is no sin but 
ignorance." -Christopher Marlowe, 1592

"HEAVEN does'nt want me & HELL is afraid I'll take over"

DEVAN GOVENDER

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

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]