Revision 2:ab9099ff88fa, 1.2 KB
(checked in by František Kučera <franta-hg@…>, 13 years ago)
|
vkládání zápatí, jmenné prostory, saxon
|
Rev | Line | |
---|
[1] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
| 2 | <xsl:stylesheet version="2.0" |
---|
| 3 | xmlns="http://www.w3.org/1999/xhtml" |
---|
[2] | 4 | xmlns:h="http://www.w3.org/1999/xhtml" |
---|
| 5 | xmlns:g="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/prostor" |
---|
| 6 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
| 7 | xmlns:fn="http://www.w3.org/2005/xpath-functions" |
---|
| 8 | exclude-result-prefixes="fn h g"> |
---|
| 9 | <xsl:output |
---|
| 10 | method="xml" |
---|
| 11 | indent="yes" |
---|
| 12 | encoding="UTF-8" |
---|
| 13 | doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" |
---|
| 14 | doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"/> |
---|
| 15 | |
---|
[1] | 16 | |
---|
| 17 | <xsl:template match="/"> |
---|
| 18 | <html> |
---|
| 19 | <head> |
---|
[2] | 20 | <title><xsl:value-of select="g:stránka/g:nadpis"/></title> |
---|
[1] | 21 | </head> |
---|
| 22 | <body> |
---|
[2] | 23 | <h1><xsl:value-of select="g:stránka/g:nadpis"/></h1> |
---|
[1] | 24 | |
---|
[2] | 25 | <!-- Vložíme obsah stránky: --> |
---|
| 26 | <xsl:apply-templates select="g:stránka/h:text/node()"/> |
---|
| 27 | |
---|
| 28 | <!-- Vložíme zápatí: --> |
---|
| 29 | <xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/> |
---|
| 30 | |
---|
[1] | 31 | </body> |
---|
| 32 | </html> |
---|
| 33 | </xsl:template> |
---|
| 34 | |
---|
| 35 | <xsl:template match="node()|@*"> |
---|
[2] | 36 | <xsl:copy> |
---|
| 37 | <xsl:apply-templates select="node()|@*"/> |
---|
| 38 | </xsl:copy> |
---|
| 39 | </xsl:template> |
---|
[1] | 40 | |
---|
| 41 | </xsl:stylesheet> |
---|