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 15:11:31 +0100 (BST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
On Thu, 13 Sep 2001, David Carlisle wrote:
>
>
> > Below is a simplified sketch of what I have at the moment.
>
> It would be better to post a (small) input document and a small required
> output. It's hard to guess from some non working code what the input
> looks like and what its supposed to do.
>
The input is actually xhtml; the output is html. The input is large, with
many includes, and the transformation I'm asking about is one of many
on the same input, so I can't easily post a whole real example.
Below is a simplified input and desired output; my problem is in
generating the forward hrefs. The input files may sometimes have
other tables with 'foo' attributes, which have to be inserted in
a fixed order in the output, and the order of the input tables
is arbitrary.
I hope this is a little more helpful!
Thanks
Graham
Sample input:
<html>
<head><title>Test</title></head>
<body>
<table foo="efg">
<tr>
<td>T7</td>T8</td>
</tr>
</table>
<table foo="abc">
<tr>
<td>T1</td>T2</td>
</tr>
</table>
<table foo="xyz">
<tr>
<td>Lots of other content, including nested tables</td>
</tr>
</table>
<table foo="def">
<tr>
<td>T5</td>T6</td>
</tr>
</table>
</body>
</html>
Desired output:
<html>
<head><title>Test</title></head>
<body>
<a href="#0">Skip to navigation</a>
<table foo="xyz">
<tr>
<td>Lots of other content, including nested tables, now transformed in various ways</td>
</tr>
</table>
<a name="0">DEF</a>
<table foo="def">
<tr>
<td><a href="#1">Skip to EFG</a></td><td>T5</td>T6</td>
</tr>
</table>
<a name="1">EFG</a>
<table foo="def">
<tr>
<td><a href="#2">Skip to ABC</a></td><td>T7</td>T8</td>
</tr>
</table>
<a name="2">ABC</a>
<table foo="abc">
<tr>
<td>T1</td>T2</td>
</tr>
</table>
</body>
</html>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list