xsl-list
[Top] [All Lists]

Re: [xsl] How Can I Reference previous XML in Subsequent Iterations?

2007-04-18 08:42:35
Here's a bit of an example of what I'm talking about. The original XML is several thousand lines long:

<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
        xmlns:o="urn:schemas-microsoft-com:office:office"
        xmlns:x="urn:schemas-microsoft-com:office:excel"
        xmlns:html="http://www.w3.org/TR/REC-html40";
        xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
        <Styles>
                <Style ss:ID="s30" ss:Name="Normal">
                        <Alignment ss:Vertical="Bottom"/>
                        <Borders/>
                        <Font ss:FontName="Verdana"/>
                        <Interior/>
                        <NumberFormat/>
                        <Protection/>
                </Style>
                <Style ss:ID="s33" ss:Name="Hyperlink">
<Font ss:FontName="Verdana" ss:Color="#0000D4" ss:Underline="Single"/>
                </Style>
        </Styles>
        <Worksheet ss:Name="Sheet1">
                <Row>
<Cell ss:Index="5" ss:StyleID="s30"><Data ss:Type="String">Some String</Data></Cell> <Cell ss:Index="6" ss:StyleID="s30"><Data ss:Type="String">Some String 2</Data></Cell> <Cell ss:Index="7" ss:StyleID="s33"><Data ss:Type="String">http:// example.com</Data></Cell>
                </Row>
        </Worksheet>
</Workbook>

I'd like to convert this to:

<table>
        <tr>
                <td style="vertical-align:bottom;font-family:Verdana">Some 
String</td>
<td style="vertical-align:bottom;font-family:Verdana">Some String 2</td> <td style="color:#0000D4;text-decoration:underline;font- family:Verdana"><a href="http://example.com";>http://example.com</a></td>
        </tr>
</table>

Chris Marshall
chris at getridofthiswholelongthingybecauseitstoconfusescrapers littlegreenviper dot com
http://www.cmarshall.net/




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--