Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output version="4.0" method="html" indent="no" encoding="UTF-8" use-character-maps="spaces" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
- <xsl:import-schema schema-location="sample.xsd"/>
- <xsl:template match="/">
- <html>
- <head>
- <title>Abschlussarbeit</title>
- </head>
- <body>
- <xsl:for-each select="./*">
- <xsl:call-template name="header1"/>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- <xsl:template name="header1">
- <h1><xsl:value-of select="concat(translate(substring(name(), 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring(name(), 2))"/></h1>
- <xsl:for-each select="element()">
- <xsl:call-template name="paragraph"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="header2">
- <h2><xsl:value-of select="concat(translate(substring(name(), 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring(name(), 2))"/></h2>
- <xsl:for-each select="element()">
- <xsl:call-template name="paragraph"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="paragraph">
- <p>
- <xsl:apply-templates/>
- </p>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement