XSL clean-up.

This commit is contained in:
Manuel Canales Esparcia 2006-03-21 20:20:45 +00:00
parent 9e1915ad32
commit 3d7b05649a
3 changed files with 15 additions and 31 deletions

View file

@ -1,17 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?> <?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "clfs-development/general.ent">
%general-entities;
]>
<!--$Id <!--$Id$ -->
XSLT stylesheet to create wget scripts to download packages and patches. <!-- Get list of packages from the CLFS Book -->
Only for Cross-LFS.
Usage example:
xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> version="1.0">
@ -24,8 +14,10 @@ xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
<xsl:template match="ulink"> <xsl:template match="ulink">
<!-- Packages. If some package don't have the string ".tar." in their <!-- Packages. If some package don't have the string ".tar." in their
name, the next test must be fixed to match it also. --> name, the next test must be fixed to match it also. Skip possible
<xsl:if test="contains(@url, '.tar.')"> duplicated URLs due that may be splitted for PDF output -->
<xsl:if test="contains(@url, '.tar.')
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:value-of select="@url"/> <xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text> <xsl:text>&#x0a;</xsl:text>
</xsl:if> </xsl:if>

View file

@ -1,17 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?> <?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "clfs-development/general.ent">
%general-entities;
]>
<!--$Id <!--$Id$ -->
XSLT stylesheet to create wget scripts to download packages and patches. <!-- Get list of patches from the CLFS Book -->
Only for Cross-LFS.
Usage example:
xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> version="1.0">
@ -25,7 +15,7 @@ xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
<xsl:template match="ulink"> <xsl:template match="ulink">
<!-- Patches. Match only the patches and skip possible duplicated <!-- Patches. Match only the patches and skip possible duplicated
URLs due that may be splitted for PDF output--> URLs due that may be splitted for PDF output-->
<xsl:if test="contains(@url, '.patch') and contains(@url, '&patches-root;') <xsl:if test="contains(@url, '.patch')
and not(ancestor-or-self::*/@condition = 'pdf')"> and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:value-of select="@url"/> <xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text> <xsl:text>&#x0a;</xsl:text>

View file

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?> <?xml version='1.0' encoding='ISO-8859-1'?>
<!-- $Id$ --> <!-- $Id$ -->
<!-- Get list of patch files from the HLFS Book --> <!-- Get list of patches from the HLFS Book -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> version="1.0">
@ -16,10 +16,12 @@
<xsl:text/> <xsl:text/>
</xsl:template> </xsl:template>
<!-- Just grab the url from the patches.xml file --> <!-- Just grab the url from the patches.xml file. Skip possible
duplicated URLs due that may be splitted for PDF output -->
<xsl:template match="//ulink"> <xsl:template match="//ulink">
<xsl:if test="ancestor::varlistentry[@condition=$model] <xsl:if test="(ancestor::varlistentry[@condition=$model]
or not(ancestor::varlistentry[@condition])"> or not(ancestor::varlistentry[@condition]))
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:value-of select="@url"/> <xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text> <xsl:text>&#x0a;</xsl:text>
</xsl:if> </xsl:if>