[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: forward references from non-ordered input?
On Thu, 13 Sep 2001, Michael Kay wrote: > One solution, simple though not particularly elegant, is to output anchors > (<a name=...>) for the elements that are absent as well as those that are > present. Then your forward reference can always point to the next element, <snip> > > Another approach that occurs to me is to have a global variable containing a > comma-separated list of the items > > <xsl:variable name="list" select="xyz,abc,def,..."/> > > Instead of the hard-coded sequence of apply-templates calls you could then > do a recursive traversal of this list, at each stage taking the name of the > current element as the first item in the list and the name of the next one > as the second element, and making the recursive call strip off the first > item in the list in the usual way. > I took the second of these options and it works fine. Many thanks to both you and David Carlisle for your help. Graham (not sure of conventions in this mailing list - seems rude not to say thank you, but given the volume of mail hope people don't feel I'm cluttering it unnecessarily...) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|