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

Re: XSLT1.0 distinct list of attributes across several

Subject: Re: XSLT1.0 distinct list of attributes across several nodes
From: "Mark Anderson mark.anderson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Jun 2018 21:51:51 -0000
Re:  XSLT1.0 distinct list of attributes across several
Thanks David

Worked great!


a Segerdahl company
Mark Anderson
Director of ERP Systems
Phone: 847-419-3329
Mobile: 13125764332
Email: mark.anderson@xxxxxxxxx
www.sg360.com
-----Original Message-----
From: David Carlisle d.p.carlisle@xxxxxxxxx
[mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, June 26, 2018 4:47 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  XSLT1.0 distinct list of attributes across several nodes

actually I think you are filtering on non-empty content rather than non-empty
id so...



$ xsltproc.exe hop.xsl hop.xml
<?xml version="1.0"?>

   post_press 25  1, 2, 3, 5
   post_press 26  1, 2, 3, 6




from


<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:key name="h" match="hopper[text()]"
      use="concat(ancestor::post_press_version/post_press_version_id,
           ':',
           @number)"/>

 <xsl:template match="order">
  <xsl:for-each select="post_press_version">
   post_press <xsl:value-of select="post_press_version_id"/>
   <xsl:text>  </xsl:text>
   <xsl:for-each select=".//hopper[text()]
             [generate-id(.)=
    generate-id(key('h',concat(ancestor::post_press_version/post_press_versio
n_id,
           ':',
           @number))[1])]">
    <xsl:if test="position()!=1">, </xsl:if>
    <xsl:value-of select="@number"/>
   </xsl:for-each>
  </xsl:for-each>
 </xsl:template>


</xsl:stylesheet>

[demime 1.01d removed an attachment of type image/jpeg which had a name of image278794.jpg]

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.