diff options
-rw-r--r-- | source/99_result/archive.xsl | 1 | ||||
-rw-r--r-- | source/99_result/article/article.xsl | 5 | ||||
-rw-r--r-- | source/99_result/category/category.xsl | 4 | ||||
-rw-r--r-- | source/99_result/page/page.xsl | 5 | ||||
-rw-r--r-- | source/99_result/stream.xsl | 5 | ||||
-rw-r--r-- | source/99_result/tag/tag.xsl | 1 | ||||
-rw-r--r-- | utility/master.xsl | 1 | ||||
-rw-r--r-- | utility/xhtml.xsl | 18 |
8 files changed, 36 insertions, 4 deletions
diff --git a/source/99_result/archive.xsl b/source/99_result/archive.xsl index 909f77f..5694779 100644 --- a/source/99_result/archive.xsl +++ b/source/99_result/archive.xsl @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > diff --git a/source/99_result/article/article.xsl b/source/99_result/article/article.xsl index 9ce19df..8d3954e 100644 --- a/source/99_result/article/article.xsl +++ b/source/99_result/article/article.xsl @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:include href="[utility/master.xsl]"/> +<xsl:include href="[utility/xhtml.xsl]"/> <xsl:include href="[utility/date-time.xsl]"/> <xsl:variable name="meta"> @@ -41,7 +43,8 @@ <xsl:text> | </xsl:text> <a href="#isso-thread">Comments</a> </p> - <xsl:copy-of select="content/node()"/> + + <xsl:apply-templates select="content/node()" mode="xhtml"/> </div> <div id="isso-thread"></div> diff --git a/source/99_result/category/category.xsl b/source/99_result/category/category.xsl index 4b49705..e0532aa 100644 --- a/source/99_result/category/category.xsl +++ b/source/99_result/category/category.xsl @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan" > <xsl:include href="[utility/master.xsl]"/> +<xsl:include href="[utility/xhtml.xsl]"/> <xsl:variable name="meta"> <datasource type="main" mode="iterate" source="02_meta/categories.xml" target="category"/> @@ -24,7 +26,7 @@ <a href="/page/{@handle}"> <strong><xsl:value-of select="title"/></strong> <p> - <xsl:copy-of select="digest/node()"/> + <xsl:apply-templates select="digest/node()" mode="xhtml"/> </p> </a> </li> diff --git a/source/99_result/page/page.xsl b/source/99_result/page/page.xsl index b703f46..5e29cdb 100644 --- a/source/99_result/page/page.xsl +++ b/source/99_result/page/page.xsl @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:include href="[utility/master.xsl]"/> +<xsl:include href="[utility/xhtml.xsl]"/> <xsl:variable name="meta"> <datasource type="main" mode="iterate" source="01_data/pages.xml" target="page"/> @@ -25,7 +27,8 @@ </a> </h2> <p class="info"/> - <xsl:copy-of select="content/*"/> + + <xsl:apply-templates select="content/node()" mode="xhtml"/> </div> </xsl:template> diff --git a/source/99_result/stream.xsl b/source/99_result/stream.xsl index 3fe93e1..5764461 100644 --- a/source/99_result/stream.xsl +++ b/source/99_result/stream.xsl @@ -1,10 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:include href="[utility/master.xsl]"/> +<xsl:include href="[utility/xhtml.xsl]"/> <xsl:include href="[utility/date-time.xsl]"/> <xsl:variable name="meta"> @@ -51,7 +53,8 @@ <xsl:text> | </xsl:text> <xsl:value-of select="$root/meta/author"/> </p> - <xsl:copy-of select="$article/content/*"/> + + <xsl:apply-templates select="$article/content/node()" mode="xhtml"/> </xsl:template> <xsl:template match="page/entry"> diff --git a/source/99_result/tag/tag.xsl b/source/99_result/tag/tag.xsl index a727111..5d41e0f 100644 --- a/source/99_result/tag/tag.xsl +++ b/source/99_result/tag/tag.xsl @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > diff --git a/utility/master.xsl b/utility/master.xsl index b495877..7227df1 100644 --- a/utility/master.xsl +++ b/utility/master.xsl @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > diff --git a/utility/xhtml.xsl b/utility/xhtml.xsl new file mode 100644 index 0000000..7347962 --- /dev/null +++ b/utility/xhtml.xsl @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet + version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> + +<xsl:template match="*" mode="xhtml"> + <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml"> + <xsl:copy-of select="@*"/> + <xsl:apply-templates select="node()" mode="xhtml"/> + </xsl:element> +</xsl:template> + +<xsl:template match="comment() | processing-instruction()" mode="xhtml"> + <xsl:copy/> +</xsl:template> + +</xsl:stylesheet> |