[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Need xsl help
This doesn't seem to match your description, but it produces the expected output, it just takes the first Contact with each unique Nid value <xsl:stylesheet version="2.0" xmlns:xsl=" http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" omit-xml-declaration="no"/> <xsl:strip-space elements="*"/> <xsl:template match="objects"> <xsl:for-each-group select="Contact" group-by="Nid"> <xsl:copy-of select="."/> </xsl:for-each-group> </xsl:template> </xsl:stylesheet> $ saxon9 nid2.xml nid2.xsl <?xml version="1.0" encoding="UTF-8"?> <Contact> <Id>003j000001DQMkcAAH</Id> <Updateeddate>2016-09-08T10:31:24.000Z</Updateeddate> <Nid>892828740</Nid> </Contact> <Contact> <Id>003j000001DQMlXAAX</Id> <Updateeddate>2016-09-08T10:22:47.000Z</Updateeddate> <Nid>879284114</Nid> </Contact> <Contact> <Id>003j000001DQMlYAAX</Id> <Updateeddate>2016-09-08T10:22:47.000Z</Updateeddate> <Nid>882692370</Nid> </Contact> David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|