diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2006-05-19 12:26:12 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2006-05-19 12:26:12 +0000 |
commit | bb2d2bc60f9c5f0268f2f537f769cbd6da49f93c (patch) | |
tree | 6d0ac3491bed30f2acd60093638de5b05033e0be /devbook.xsl | |
parent | Fix Diego's name, and add josejx as a contributor (diff) | |
download | devmanual-bb2d2bc60f9c5f0268f2f537f769cbd6da49f93c.tar.gz devmanual-bb2d2bc60f9c5f0268f2f537f769cbd6da49f93c.tar.bz2 devmanual-bb2d2bc60f9c5f0268f2f537f769cbd6da49f93c.zip |
XSL Namespace fixes so the output validates correctly.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/devmanual/trunk@53 176d3534-300d-0410-8db8-84e73ed771c3
Diffstat (limited to 'devbook.xsl')
-rw-r--r-- | devbook.xsl | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/devbook.xsl b/devbook.xsl index fe5c192..b32729a 100644 --- a/devbook.xsl +++ b/devbook.xsl @@ -2,7 +2,8 @@ xmlns:str="http://exslt.org/strings" xmlns:exslt="http://exslt.org/common" extension-element-prefixes="str exslt xsl" - exclude-result-prefixes="str exslt xsl"> + exclude-result-prefixes="str exslt xsl" + xmlns="http://www.w3.org/1999/xhtml"> <xsl:import href="xsl/str.tokenize.function.xsl"/> <xsl:import href="xsl/lang.highlight.c.xsl"/> @@ -11,7 +12,7 @@ <xsl:import href="xsl/lang.highlight.m4.xsl"/> <xsl:import href="xsl/lang.highlight.sgml.xsl"/> -<xsl:output method="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" +<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes"/> <xsl:variable name="newline"> @@ -340,7 +341,14 @@ <xsl:otherwise><xsl:value-of select="/guide/@self"/></xsl:otherwise> </xsl:choose> </xsl:param> - <xsl:param name="path_rel"/> + <xsl:param name="path_rel"> + <xsl:if test="$depth = 0 and $path = '' and /guide/@self != ''"> + <xsl:call-template name="str:repeatString"> + <xsl:with-param name="count" select="string-length(/guide/@self)-string-length(translate(/guide/@self, '/' , ''))"/> + <xsl:with-param name="append">../</xsl:with-param> + </xsl:call-template> + </xsl:if> + </xsl:param> <xsl:param name="extraction" select="@extraction"/> <xsl:param name="extraction_counting"/> @@ -379,7 +387,12 @@ <li> <a class="reference" href="{concat($path_rel, @href, 'index.html')}"><xsl:value-of select="document(concat($path, @href, 'text.xml'))/guide/chapter[1]/title"/></a> <xsl:if test="$extraction != ''"> - <xsl:apply-templates select="document(concat($path, @href, 'text.xml'))//*[name()=$extraction]"/> + <ul> + <xsl:for-each select="document(concat($path, @href, 'text.xml'))//*[name()=$extraction]"> + <xsl:variable name="extraction_id" select="position()"/> + <li><xsl:apply-templates select="(//*[name()=$extraction])[position()=$extraction_id]"/><br/></li> + </xsl:for-each> + </ul> </xsl:if> <xsl:call-template name="contentsTree"> <xsl:with-param name="depth" select="$depth + 1"/> |