All pastes #252699 Raw Edit

Stuff

public text v1 · immutable
#252699 ·published 2006-11-19 21:29 UTC
rendered paste body
<!-- test.xml -->
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<root>
        <title>----</title>
        <item>a</item>
        <item>bc</item>
        <item>def</item>
        <item>ghij</item>
        <item>klmno</item>
        <item>pqrstu</item>
</root>


<!-- test.xsl -->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output method="xml" indent="yes" encoding="iso-8859-1" doctype-public="-//W3C/DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

        <xsl:template match="/">
        <xsl:processing-instruction name="xml-stylesheet">
                <xsl:text>type="text/css" href="/general.css"</xsl:text>
        </xsl:processing-instruction>

        <html lang="en-US" xml:lang="en-US">
                <head>
                        <title> <xsl:value-of select="child::root/child::title/child::text()"/> </title>
                </head>

                <body>

                <h1>Header</h1>

                <ul>
                <xsl:for-each select="child::root/child::item/child::text()">
                        <li> <xsl:value-of select="."/> </li>
                </xsl:for-each>
                </ul>
                </body>
        </html>
</xsl:template>
</xsl:stylesheet>