Subject: Re: [xsl] Comparing nodes minus one child From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 25 Sep 2001 16:36:27 -0400 |
If I have two elements that have the same structure in two variables(today_product and yesterday_product): <Product> <Child1>...</Child1> <Child2>...</Child2> ... <ChildX>...</ChildX> </Product>
How can I compare the two <Product> elements by comparing everything but <ChildX> to see if they are equal? If possible, I would like to do this in one line as opposed to comparing each part, which I can already do.
<xsl:variable name="prod-1-value"> <xsl:apply-templates select="$today-product" mode="product-compare"/> </xsl:variable>
<xsl:variable name="prod-2-value"> <xsl:apply-templates select="$yesterday-product" mode="product-compare"/> </xsl:variable>
<xsl:template match="*" mode="product-compare"> <xsl:value-of select="concat('[', local-name(), ']')"/> <xsl:apply-templates mode="product-compare"/> </xsl:template>
i.e. today_product (minus ChildX) ?= yesterday_product (minus ChildX)
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 -> |
---|---|---|
[xsl] Comparing nodes minus one chi, mjyoungblut | Thread | Re: [xsl] Comparing nodes minus one, mjyoungblut |
[xsl] Equals (=), mjyoungblut | Date | Re: [xsl] Equals (=), Wendell Piez |
Month |