diff options
author | Pierre Labastie <pierre.labastie@neuf.fr> | 2024-01-18 20:35:28 +0100 |
---|---|---|
committer | Pierre Labastie <pierre.labastie@neuf.fr> | 2024-01-18 20:42:26 +0100 |
commit | 2a26a4f5df7c2487afb89fcd05d99133e84b284c (patch) | |
tree | c7f738ee9fc953e4f00766963537ac463753221c | |
parent | 9512d6c7ba21e5765754b53db08c55851fecdc05 (diff) |
Remove all &#xxx; occurences
- replace some characters by their utf-8 encoded equivalent (and change
encoding in the <?xml?> line
- replace 
 with a true newline char. This is somewhat more readable
anyway.
-rw-r--r-- | stylesheets/dump-commands.xsl | 3 | ||||
-rw-r--r-- | stylesheets/lfs-xsl/pdf.xsl | 8 | ||||
-rw-r--r-- | stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl | 6 | ||||
-rw-r--r-- | stylesheets/md5sum.xsl | 8 | ||||
-rw-r--r-- | stylesheets/patcheslist.xsl | 35 | ||||
-rw-r--r-- | stylesheets/wget-list.xsl | 3 |
6 files changed, 37 insertions, 26 deletions
diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl index 9e2af96e4..48af34c20 100644 --- a/stylesheets/dump-commands.xsl +++ b/stylesheets/dump-commands.xsl @@ -7,7 +7,8 @@ <!-- XSLT stylesheet to extract commands from [B,H]LFS books. --> <xsl:variable name="newline"> - <xsl:text>
</xsl:text> + <xsl:text> +</xsl:text> </xsl:variable> <xsl:template match="/"> diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl index 4028a19ea..679f73b84 100644 --- a/stylesheets/lfs-xsl/pdf.xsl +++ b/stylesheets/lfs-xsl/pdf.xsl @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='ISO-8859-1'?> +<?xml version='1.0' encoding='UTF-8'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" @@ -51,8 +51,10 @@ <!-- Allow URLs to be automatically hyphenated. We have expanded the support to several inline tags. - See pdf/lfs-mixed.xsl --> - <xsl:param name="ulink.hyphenate" select="'​'"/> + See pdf/lfs-mixed.xsl. + Note: the argument in select= is a zero-width space + (unicode 200b, encoded in utf-8)--> + <xsl:param name="ulink.hyphenate" select="''"/> <!-- List of characters to allow ulink URLs, and supported inline tags, to be automatically hyphenated on. diff --git a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl index da57f7395..f6780385a 100644 --- a/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl +++ b/stylesheets/lfs-xsl/xhtml/lfs-mixed.xsl @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='ISO-8859-1'?> +<?xml version='1.0' encoding='UTF-8'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" @@ -294,7 +294,9 @@ </td> </xsl:when> <xsl:when test="$numcols > 3"> - <td> </td> + <!-- The space between <td> and </td> is a non breakable + space (unicode A0) encoded in utf-8.--> + <td> </td> </xsl:when> <xsl:otherwise/> </xsl:choose> diff --git a/stylesheets/md5sum.xsl b/stylesheets/md5sum.xsl index 617bd4aa9..bb7268276 100644 --- a/stylesheets/md5sum.xsl +++ b/stylesheets/md5sum.xsl @@ -1,6 +1,6 @@ -<?xml version='1.0' encoding='ISO-8859-1'?> +<?xml version='1.0' encoding='UTF-8'?> -<!-- Create a md5 list for packages and pathces used. --> +<!-- Create a md5 list for packages and patches used. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> @@ -31,7 +31,8 @@ </xsl:call-template> <!-- Add a newline --> - <xsl:text>
</xsl:text> + <xsl:text> +</xsl:text> </xsl:if> </xsl:template> @@ -55,4 +56,3 @@ </xsl:template> </xsl:stylesheet> - diff --git a/stylesheets/patcheslist.xsl b/stylesheets/patcheslist.xsl index d86d1814d..f863edc1f 100644 --- a/stylesheets/patcheslist.xsl +++ b/stylesheets/patcheslist.xsl @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='ISO-8859-1'?> +<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE xsl:stylesheet [ <!ENTITY % general-entities SYSTEM "../general.ent"> %general-entities; @@ -22,26 +22,30 @@ function copy cp $1 $2 >>copyerrs 2>&1 } -umask 002 

</xsl:text> +umask 002 - <!-- Create dest.dir if it don't exist --> - <xsl:text>install -d -m 775 -g lfswww </xsl:text> +# Create dest.dir if it doesn't exist +# Remove old patches +# Copy the patches +# Ensure correct ownership +install -d -m 775 -g lfswww </xsl:text> <xsl:value-of select="$dest.dir"/> - <xsl:text> &&
</xsl:text> - <xsl:text>cd </xsl:text> + <xsl:text> && +cd </xsl:text> <xsl:value-of select="$dest.dir"/> - <xsl:text> &&

</xsl:text> - <!-- Remove old patches --> - <xsl:text>rm -f *.patch copyerrs && 

</xsl:text> + <xsl:text> && +rm -f *.patch copyerrs && + +</xsl:text> <xsl:apply-templates/> - <!-- Ensure correct owneship --> - <xsl:text>
chgrp lfswww *.patch &&
</xsl:text> <xsl:text> +chgrp lfswww *.patch && if [ `wc -l copyerrs | sed 's/ *//' | cut -f1 -d' '` -gt 0 ]; then mail -s "Missing LFS patches" lfs-book@lists.linuxfromscratch.org < copyerrs -fi

</xsl:text> +fi - <xsl:text>exit
</xsl:text> +exit +</xsl:text> </xsl:template> <xsl:template match="//text()"/> @@ -59,10 +63,11 @@ fi

</xsl:text> <xsl:value-of select="$cut"/> </xsl:variable> <xsl:text>copy /srv/www/www.linuxfromscratch.org/patches/downloads/</xsl:text> - <xsl:value-of select="substring-before($patch.name2, '-0')"/> + <xsl:value-of select="substring-before($patch.name2, '-0')"/> <xsl:text>/</xsl:text> <xsl:value-of select="$patch.name"/> - <xsl:text> . 
</xsl:text> + <xsl:text> . +</xsl:text> </xsl:if> </xsl:template> diff --git a/stylesheets/wget-list.xsl b/stylesheets/wget-list.xsl index 62a518d38..f280fb36c 100644 --- a/stylesheets/wget-list.xsl +++ b/stylesheets/wget-list.xsl @@ -28,7 +28,8 @@ <xsl:value-of select="@url"/> </xsl:otherwise> </xsl:choose> - <xsl:text>
</xsl:text> + <xsl:text> +</xsl:text> </xsl:if> </xsl:template> |