Subject: RE: [xsl] Outputing Differences between two files From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Mon, 18 Jul 2005 15:15:32 +0100 |
For all problems involving looking for duplicates, or grouping, use Muenchian grouping in XSLT 1.0 or xsl:for-each-group in 2.0. It's a little hard from this problem description to see how it would extrapolate to different input files. For example, what output would you want if the input were: > <a> > <b>Value1</b> > <bb>Value2</bb> > <bbb>Value3</bbb> > </a> > <c> > <b>Value1</b> > <bb>Value4</bb> > <bbb>Value5</bbb> > </c> or if it were: > <c> > <b>Value4</b> > <bb>Value2</bb> > <bbb>Value5</bbb> > </c> > <a> > <b>Value1</b> > <bb>Value2</bb> > <bbb>Value3</bbb> > </a> Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Jonathan Marenus [mailto:jonathanmarenus@xxxxxxxxx] > Sent: 18 July 2005 11:07 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Outputing Differences between two files > > > I'm trying to write an XSL that receives an XML file > as input and outputs only the values that have a > certain sibling's value duplicated in the file. For > example, if I have the following XML: > > <a> > <b>Value1</b> > <bb>Value2</bb> > <bbb>Value3</bbb> > </a> > <c> > <b>Value4</b> > <bb>Value2</bb> > <bbb>Value5</bbb> > </c> > > In this example, I want the output sibling to be > "a/bbb". Since "Value2" is shown twice for element > bb, I want to output "Value3", since that is the > output sibling. Any feedback regarding this example > would be appreciated, so that I can apply it to my > actual situation. > > Thanks. > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Outputing Differences bet, Werner, Wolfgang | Thread | Re: [xsl] Outputing Differences bet, Geert Josten |
[xsl] ANN: nxslt (.NET XSLT Command, Oleg Tkachenko | Date | RE: [xsl] Help needed in XSD, Michael Kay |
Month |