This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: forward references from non-ordered input?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] forward references from non-ordered input?
- From: Graham Seaman <graham at codix dot net>
- Date: Thu, 13 Sep 2001 16:40:16 +0100 (BST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
On Thu, 13 Sep 2001, David Carlisle wrote:
>
> > The input files may sometimes have
> > other tables with 'foo' attributes, which have to be inserted in
> > a fixed order in the output,
>
> what specifies the order?
> your href's just appear to be pointing at the next table. This ought to
> be easy to generate by whatever means you use to determin the order of
> the output tables, but is this a given list or by sorting the input?
>
The order is given by the stylesheet, but should be easy to modify. I
can't think of a way to use the built-in 'sort', if that's what you mean:
my original version just has a big 'choose' which selects the attributes
in the order required. This does not reflect any systematic ordering
in the input.
However, with this I couldn't find a way to point
to the next table: there are currently about 15 possible attributes,
and for any one input page it is possible that between 0-15 tables with
the attributes are present. So the 'current' table at any point has no
easy way I know of to decide whether there is a next table to point to, or
not. Also, I don't know how to let each table know what its own number
is without putting it in a recursive template with a 'count' variable.
Maybe I'm thinking of the problem the wrong way, I having some trouble
adjusting my head to non-procedural programming :-(
Graham
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list