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

View file

@ -1,17 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY % general-entities SYSTEM "clfs-development/general.ent">
%general-entities;
]>
<!--$Id
XSLT stylesheet to create wget scripts to download packages and patches.
Only for Cross-LFS.
Usage example:
xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
-->
<!--$Id$ -->
<!-- Get list of patches from the CLFS Book -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@ -25,7 +15,7 @@ xsltproc -xinclude -output x86.wget stylesheets/wget.xsl x86-index.xml
<xsl:template match="ulink">
<!-- Patches. Match only the patches and skip possible duplicated
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')">
<xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text>

View file

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='ISO-8859-1'?>
<!-- $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"
version="1.0">
@ -16,10 +16,12 @@
<xsl:text/>
</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:if test="ancestor::varlistentry[@condition=$model]
or not(ancestor::varlistentry[@condition])">
<xsl:if test="(ancestor::varlistentry[@condition=$model]
or not(ancestor::varlistentry[@condition]))
and not(ancestor-or-self::*/@condition = 'pdf')">
<xsl:value-of select="@url"/>
<xsl:text>&#x0a;</xsl:text>
</xsl:if>