|
Subject: RE: [xsl] Delete XML Node From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 01 Nov 2002 11:39:15 -0500 |
Or more simply, if a Y will never have more than one B, you can do
<xsl:template match="B"> <B1> <xsl:apply-templates/> </B1> </xsl:template>
This allows your rule (finding that you need a Y since you have a B='ABC') to be in one place, which is better; the down side is that if you have input like
<Y> <B>ABC</B> <B>LMN</B> <C>zzz</C> <Y>
And your rules are only in the Y template, since "B[.='ABC'] or C[.='XYZ']" is true, all B and C elements will be processed.
<xsl:template match="Y">
<xsl:if test="B[.='ABC'] or C[.='XYZ']">
<Y1>
<xsl:apply-templates select="B[.='ABC'] | C[.='XYZ']"/>
</Y1>
</xsl:if>
</xsl:template><xsl:template match="Y[B[.='ABC'] or C[.='XYZ']]">
<Y1>
<xsl:apply-templates select="B[.='ABC'] | C[.='XYZ']"/>
</Y1>
</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] Delete XML Node, Wendell Piez | Thread | [xsl] msxml encoding for multi-lang, katharine wykes |
| RE: [xsl] Delete XML Node, Wendell Piez | Date | Re: [xsl] Re: Saravega?, Ritu |
| Month |