* Make <link xlink:href="http://..." /> (i.e., link with no content)

work as in docbook-xsl-1.71.0 (and consistent with the DocBook
  Guide).

svn path=/nixpkgs/trunk/; revision=7836
This commit is contained in:
Eelco Dolstra 2007-02-05 12:17:30 +00:00
parent 6ad7f54086
commit 374e444a08
3 changed files with 28 additions and 6 deletions

View File

@ -1,8 +1,12 @@
source $stdenv/setup source $stdenv/setup
ensureDir $out buildPhase=true
cd $out
unpackFile $src installPhase=myInstallPhase
mkdir xml myInstallPhase() {
mkdir xml/xsl ensureDir $out/xml/xsl
mv docbook5-xsl-* xml/xsl/docbook cd ..
mv docbook5-xsl-* $out/xml/xsl/docbook
}
genericBuild

View File

@ -7,4 +7,5 @@ stdenv.mkDerivation {
url = http://heanet.dl.sourceforge.net/sourceforge/docbook/docbook5-xsl-1.72.0.tar.bz2; url = http://heanet.dl.sourceforge.net/sourceforge/docbook/docbook5-xsl-1.72.0.tar.bz2;
sha256 = "0iy7axmk3nvaqgxg5lh7qx39ad9g3qrgwikrp5w4z7bwlrpijfpx"; sha256 = "0iy7axmk3nvaqgxg5lh7qx39ad9g3qrgwikrp5w4z7bwlrpijfpx";
}; };
patches = [./link-href.patch];
} }

View File

@ -0,0 +1,17 @@
diff -rc docbook5-xsl-1.72.0-orig/html/xref.xsl docbook5-xsl-1.72.0/html/xref.xsl
*** docbook5-xsl-1.72.0-orig/html/xref.xsl 2007-01-23 21:50:22.000000000 +0100
--- docbook5-xsl-1.72.0/html/xref.xsl 2007-02-05 12:53:50.000000000 +0100
***************
*** 898,903 ****
--- 898,908 ----
<!-- If it has content, use it -->
<xsl:apply-templates/>
</xsl:when>
+ <xsl:when test="@xlink:href">
+ <a href="@xlink:href">
+ <xsl:value-of select="@xlink:href"/>
+ </a>
+ </xsl:when>
<xsl:otherwise>
<!-- else look for an endterm -->
<xsl:choose>