SHOW:
|
|
- or go back to the newest paste.
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
3 | <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"/> | |
4 | - | <xsl:import-schema schema-location="C:\Users\DannyLo\Dropbox\share jova_danylo\ueb10\schema_abschlussarbeit.xsd"/> |
4 | + | <xsl:import-schema schema-location="sample.xsd"/> |
5 | <xsl:template match="/"> | |
6 | <html> | |
7 | <head> | |
8 | <title>Abschlussarbeit</title> | |
9 | </head> | |
10 | <body> | |
11 | <xsl:for-each select="./*"> | |
12 | <xsl:call-template name="header1"/> | |
13 | </xsl:for-each> | |
14 | </body> | |
15 | </html> | |
16 | </xsl:template> | |
17 | <xsl:template name="header1"> | |
18 | <h1><xsl:value-of select="concat(translate(substring(name(), 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring(name(), 2))"/></h1> | |
19 | <xsl:for-each select="element()"> | |
20 | <xsl:call-template name="paragraph"/> | |
21 | </xsl:for-each> | |
22 | </xsl:template> | |
23 | ||
24 | <xsl:template name="header2"> | |
25 | <h2><xsl:value-of select="concat(translate(substring(name(), 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring(name(), 2))"/></h2> | |
26 | <xsl:for-each select="element()"> | |
27 | <xsl:call-template name="paragraph"/> | |
28 | </xsl:for-each> | |
29 | </xsl:template> | |
30 | ||
31 | <xsl:template name="paragraph"> | |
32 | <p> | |
33 | <xsl:apply-templates/> | |
34 | </p> | |
35 | </xsl:template> | |
36 | ||
37 | </xsl:stylesheet> |