[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Getting unique nodes filtering by several attribut

Subject: RE: Getting unique nodes filtering by several attributes and mixing files
From: Jarno.Elovirta@xxxxxxxxx
Date: Wed, 26 Nov 2003 08:54:50 +0200
unique nodes xsl
Hi,

Did you want

>   <adsAt>10:15</adsAt>
or

>     <commercials hour='10:15' pricing='450.0'/>

Anyhow, you didn't get all the program attributes because you copied them after creating element child nodes. Try

  <xsl:template match="programs">
    <tv>
      <xsl:for-each select="program">
        <xsl:copy>
          <xsl:copy-of select="@*"/>
          <xsl:variable name="key" select="concat(@progName, $sep, @weekDay, $sep, @channel)"/>
          <xsl:for-each select="$schedule">
            <xsl:variable name="air" select="key('lookup', $key)"/>
            <xsl:copy-of select="$air/@date"/>
            <xsl:for-each select="$air/@adsAt">
              <commercials hour="{.}" pricing="{../@pricing}"/>
            </xsl:for-each>
          </xsl:for-each>
        </xsl:copy>
      </xsl:for-each>
    </tv>
  </xsl:template>

Cheers,

Jarno - Bruderschaft: Forever (Harlem Hardstyle Remix by Dräcos)

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.