Subject: RE: [xsl] Integrated sort using different elements|
From: "Houghton,Andrew" <houghtoa@xxxxxxxx>
Date: Thu, 19 Feb 2009 11:25:54 -0500
> From: Quinn Dombrowski [mailto:qdombrow@xxxxxxxx] > Sent: Thursday, February 19, 2009 11:13 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] Integrated sort using different elements > > Hi Andy, > > I wish it were so simple... the priority of the elements != the > document > order of the elements. If there's no monogr/author, then it jumps to > analytic/author (which is before it in document order), then editor > (somewhere else), and so on. OK, I now see where I misunderstood the requirements. In my example input XML the XSLT should have resulted in the output XML being in the same order as the input document since the first biblStruct element had a monogr/author of "Author Name 0" and the second biblStruct element had a monogr/author of "Author Name 1". Note in XSLT 2.0 you can create an xsl:function that returns a string and use it in the select of xsl:sort. So you can implement any complex rule requirements you have. However, the suggested sequence thing works nicely and I'll have to add that one to my toolbox. Thanks to all those who pointed out the misunderstanding. Andy.