From: <bob...@us...> - 2009-03-07 18:07:49
|
Revision: 8290 http://docbook.svn.sourceforge.net/docbook/?rev=8290&view=rev Author: bobstayton Date: 2009-03-07 18:07:39 +0000 (Sat, 07 Mar 2009) Log Message: ----------- Fix bug #1787167 incorrect hot text for some olinks. Modified Paths: -------------- trunk/xsl/common/olink.xsl Modified: trunk/xsl/common/olink.xsl =================================================================== --- trunk/xsl/common/olink.xsl 2009-03-07 00:08:46 UTC (rev 8289) +++ trunk/xsl/common/olink.xsl 2009-03-07 18:07:39 UTC (rev 8290) @@ -129,7 +129,7 @@ $targetptr.att, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseA matched.</xsl:message> @@ -159,7 +159,7 @@ $targetptr.att, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseB matched.</xsl:message> @@ -188,7 +188,7 @@ $targetptr.att, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseC matched.</xsl:message> @@ -218,7 +218,7 @@ $targetptr.att, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseD matched.</xsl:message> @@ -257,7 +257,7 @@ $rootid, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseE matched.</xsl:message> @@ -299,7 +299,7 @@ $rootid, '/', $target.lang)"/> <xsl:choose> - <xsl:when test="key('targetptr-key', $key)/@href != ''"> + <xsl:when test="key('targetptr-key', $key)[1]/@href != ''"> <xsl:value-of select="$key"/> <xsl:if test="$olink.debug != 0"> <xsl:message>Olink debug: CaseF matched.</xsl:message> @@ -447,7 +447,7 @@ <xsl:if test="$olink.key != ''"> <xsl:variable name="target.href" > <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $olink.key)/@href" /> + <xsl:value-of select="key('targetptr-key', $olink.key)[1]/@href" /> </xsl:for-each> </xsl:variable> @@ -476,7 +476,7 @@ <xsl:variable name="currentdoc.key" > <xsl:for-each select="$target.database" > <xsl:value-of select="key('targetdoc-key', - $current.docid)/@targetdoc" /> + $current.docid)[1]/@targetdoc" /> </xsl:for-each> </xsl:variable> <xsl:choose> @@ -484,7 +484,7 @@ <xsl:for-each select="$target.database" > <xsl:call-template name="targetpath" > <xsl:with-param name="dirnode" - select="key('targetdoc-key', $current.docid)/parent::dir"/> + select="key('targetdoc-key', $current.docid)[1]/parent::dir"/> <xsl:with-param name="targetdoc" select="$targetdoc"/> </xsl:call-template> </xsl:for-each > @@ -509,7 +509,7 @@ <!-- In either case, add baseuri from its document entry--> <xsl:variable name="docbaseuri"> <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri" /> + <xsl:value-of select="key('targetdoc-key', $targetdoc)[1]/@baseuri" /> </xsl:for-each> </xsl:variable> <xsl:if test="$docbaseuri != ''" > @@ -521,7 +521,7 @@ <!-- Just use any baseuri from its document entry --> <xsl:variable name="docbaseuri"> <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetdoc-key', $targetdoc)/@baseuri" /> + <xsl:value-of select="key('targetdoc-key', $targetdoc)[1]/@baseuri" /> </xsl:for-each> </xsl:variable> <xsl:if test="$docbaseuri != ''" > @@ -575,7 +575,7 @@ <xsl:variable name="from.olink.href"> <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $from.key)/@href" /> + <xsl:value-of select="key('targetptr-key', $from.key)[1]/@href" /> </xsl:for-each> </xsl:variable> @@ -627,19 +627,19 @@ <xsl:variable name="xref.text" > <xsl:for-each select="$target.database" > <xsl:copy-of - select="key('targetptr-key', $olink.key)/xreftext/node()" /> + select="key('targetptr-key', $olink.key)[1]/xreftext/node()" /> </xsl:for-each> </xsl:variable> <xsl:variable name="xref.number" > <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $olink.key)/@number" /> + <xsl:value-of select="key('targetptr-key', $olink.key)[1]/@number" /> </xsl:for-each> </xsl:variable> <xsl:variable name="target.elem" > <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $olink.key)/@element" /> + <xsl:value-of select="key('targetptr-key', $olink.key)[1]/@element" /> </xsl:for-each> </xsl:variable> @@ -647,7 +647,7 @@ <xsl:variable name="candidate"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@lang" /> + select="key('targetptr-key', $olink.key)[1]/@lang" /> </xsl:for-each> </xsl:variable> <xsl:choose> @@ -853,25 +853,25 @@ <xsl:with-param name="template" select="$template"/> <xsl:with-param name="title"> <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $olink.key)/ttl" /> + <xsl:value-of select="key('targetptr-key', $olink.key)[1]/ttl" /> </xsl:for-each> </xsl:with-param> <xsl:with-param name="label"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@number" /> + select="key('targetptr-key', $olink.key)[1]/@number" /> </xsl:for-each> </xsl:with-param> <xsl:with-param name="pagenumber"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@page" /> + select="key('targetptr-key', $olink.key)[1]/@page" /> </xsl:for-each> </xsl:with-param> <xsl:with-param name="docname"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetdoc-key', $targetdoc)/div[1]/ttl" /> + select="key('targetdoc-key', $targetdoc)[1]/div[1]/ttl" /> </xsl:for-each> </xsl:with-param> </xsl:call-template> @@ -891,13 +891,13 @@ <xsl:with-param name="template" select="$template"/> <xsl:with-param name="title"> <xsl:for-each select="$target.database" > - <xsl:value-of select="key('targetptr-key', $olink.key)/ttl" /> + <xsl:value-of select="key('targetptr-key', $olink.key)[1]/ttl" /> </xsl:for-each> </xsl:with-param> <xsl:with-param name="label"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@number" /> + select="key('targetptr-key', $olink.key)[1]/@number" /> </xsl:for-each> </xsl:with-param> </xsl:call-template> @@ -1027,7 +1027,7 @@ <xsl:variable name="page-number"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@page" /> + select="key('targetptr-key', $olink.key)[1]/@page" /> </xsl:for-each> </xsl:variable> @@ -1067,7 +1067,7 @@ <xsl:variable name="page"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetptr-key', $olink.key)/@page" /> + select="key('targetptr-key', $olink.key)[1]/@page" /> </xsl:for-each> </xsl:variable> @@ -1084,14 +1084,14 @@ <xsl:variable name="rootptr"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetdoc-key', $targetdoc)/div[1]/@targetptr" /> + select="key('targetdoc-key', $targetdoc)[1]/div[1]/@targetptr" /> </xsl:for-each> </xsl:variable> <xsl:variable name="docname"> <xsl:for-each select="$target.database" > <xsl:value-of - select="key('targetdoc-key', $targetdoc)/div[1]/ttl" /> + select="key('targetdoc-key', $targetdoc)[1]/div[1]/ttl" /> </xsl:for-each> </xsl:variable> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |