This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]