diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2003-11-15 18:46:55 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2003-11-15 18:46:55 +0000 |
commit | 212be899b26b45e8a96a8a14693822809a819ece (patch) | |
tree | c1e33830acb64825cb734665a3b18e67a1eff3c2 | |
parent | 9550a34d165dfcb1726b2a40cf8472cda4ec827f (diff) | |
download | yelp-212be899b26b45e8a96a8a14693822809a819ece.tar.gz |
- Added resolve_xref_chunk parameter
* stylesheets/db2html-param.xsl:
* stylesheets/db2html-xref.xsl:
- Added resolve_xref_chunk parameter
-rw-r--r-- | stylesheets/ChangeLog | 6 | ||||
-rw-r--r-- | stylesheets/db2html-param.xsl | 2 | ||||
-rw-r--r-- | stylesheets/db2html-xref.xsl | 24 |
3 files changed, 24 insertions, 8 deletions
diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog index 8be86ccf..88ef1537 100644 --- a/stylesheets/ChangeLog +++ b/stylesheets/ChangeLog @@ -1,3 +1,9 @@ +2003-11-15 Shaun McCance <shaunm@gnome.org> + + * db2html-param.xsl: + * db2html-xref.xsl: + - Added resolve_xref_chunk parameter + 2003-10-30 Shaun McCance <shaunm@gnome.org> * db2html-chunk.xsl: diff --git a/stylesheets/db2html-param.xsl b/stylesheets/db2html-param.xsl index 712b0c19..196db798 100644 --- a/stylesheets/db2html-param.xsl +++ b/stylesheets/db2html-param.xsl @@ -45,6 +45,8 @@ <xsl:param name="mediaobject_path" select="$doc_path"/> +<xsl:param name="resolve_xref_chunk" select="true()"/> + <xsl:param name="text_only" select="false()"/> </xsl:stylesheet> diff --git a/stylesheets/db2html-xref.xsl b/stylesheets/db2html-xref.xsl index aac54480..0ceca599 100644 --- a/stylesheets/db2html-xref.xsl +++ b/stylesheets/db2html-xref.xsl @@ -84,14 +84,22 @@ <xsl:template name="xref.target"> <xsl:param name="linkend" select="@linkend"/> <xsl:param name="target" select="id($linkend)"/> - <xsl:variable name="chunk_id"> - <xsl:apply-templates select="$target" mode="chunk.id.mode"/> - </xsl:variable> - <xsl:value-of select="concat($chunk_id, $html_extension)"/> - <xsl:if test="$linkend and string($chunk_id) != $linkend"> - <xsl:text>#</xsl:text> - <xsl:value-of select="$linkend"/> - </xsl:if> + <xsl:choose> + <xsl:when test="$resolve_xref_chunk"> + <xsl:variable name="chunk_id"> + <xsl:apply-templates select="$target" mode="chunk.id.mode"/> + </xsl:variable> + <xsl:value-of select="concat($chunk_id, $html_extension)"/> + <xsl:if test="$linkend and string($chunk_id) != $linkend"> + <xsl:text>#</xsl:text> + <xsl:value-of select="$linkend"/> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:text>#</xsl:text> + <xsl:value-of select="$linkend"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <!-- ======================================================================= --> |