Subject: RE: [xsl] template match for subelement throughout tree From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 15 Apr 2003 11:55:02 -0400 |
I'm still doing something wrong...sorry. For example, when I applied the changes to the template below, I get error messages about the "< not allowed as attribute" etc.
<xsl:for-each select="node> <xsl:apply-templates/> </xsl:for-each>
Also, I thought for-each was needed in order to create a new table row for each listitem?
P.S. When SHOULD you use for-each?
<xsl:template match="parent"> <xsl:for-each select="child"> <xsl:text>Whee!</xsl:text> </xsl:for-each> <xsl:apply-templates/> </xsl:template>
<xsl:template match="child"> <xsl:text>Oo!</xsl:text> </xsl:template>
<xsl:template match="parent"> <xsl:apply-templates mode="whee"/> <xsl:apply-templates/> </xsl:template>
<xsl:template match="child"> <xsl:text>Oo!</xsl:text> </xsl:template>
<xsl:template match="child" mode="whee"> <xsl:text>Whee!</xsl:text> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] template match for subele, Kathy Burke | Thread | RE: [xsl] template match for subele, Kathy Burke |
Re: I'm an idiot (was Re: [xsl] How, Wendell Piez | Date | [xsl] Deleting Duplicate Elements, Jan Zavoral |
Month |