|
Subject: Re: [xsl] $5 PAYPAL for correct answer still not claimed! Searching for an attribute across different elements with ancestoral elements returned From: "Christopher R. Maden" <crism@xxxxxxxxx> Date: Fri, 20 Jul 2001 03:37:40 -0700 |
I wish to return all brands/lines/items that have this @OFFER attribute.
<!-- by default, don't copy anything --> <xsl:template match="BRAND | LINE | ITEM" priority="1"/>
<!-- if there are children with offers, copy this element and then look
at its children one by one -->
<xsl:template match="BRAND[LINE/@OFFER or LINE/ITEM/@OFFER] |
LINE[ITEM/@OFFER]" priority="2">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template><!-- if this one has the offer, copy it and all its descendants -->
<xsl:template match="BRAND[@OFFER] | LINE[@OFFER] |
ITEM[@OFFER]" priority="3">
<xsl:copy-of select="."/>
</xsl:template>HTH, Chris -- Christopher R. Maden, XML Consultant DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training <URL: http://crism.maden.org/consulting/ > PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Searching for an attribut, Rob Lugt | Thread | RE: [xsl] $5 PAYPAL for correct ans, Bedwell Tom |
| Re: [xsl] $5 PAYPAL for correct ans, Christopher R. Maden | Date | RE: [xsl] Getting date of the XSL t, Ghostrider |
| Month |