Ignore:
Timestamp:
01/18/2024 12:11:58 PM (5 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
9512d6c
Parents:
0cbc2c0a
git-author:
Pierre Labastie <pierre.labastie@…> (01/18/2024 12:07:22 PM)
git-committer:
Pierre Labastie <pierre.labastie@…> (01/18/2024 12:11:58 PM)
Message:

stylesheets: rm code for xlink:href attr in xref elemts

We don't use it and it uses &#40; for opening parenthesis.
I am not sure whether this has some reason or not, but
we want to get reed of &#xx; chars in our change to utf-8,
so easier to remove than to find out why...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/lfs-xsl/xhtml/lfs-xref.xsl

    r0cbc2c0a rd6cbb12c  
    22
    33<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    4                 xmlns:xlink="http://www.w3.org/1999/xlink"
    54                xmlns="http://www.w3.org/1999/xhtml"
    6                 exclude-result-prefixes="xlink"
    75                version="1.0">
    86
     
    1614
    1715    <!-- xref:
    18            Added role variable and use it when calling mode xref-to.-->
     16           Added role variable and use it when calling mode xref-to.
     17           Also remove code for xlink:href attributes in xref elements
     18           since we don't use it.-->
    1919    <!-- The original template is in {docbook-xsl}/xhtml/xref.xsl -->
    2020  <xsl:template match="xref" name="xref">
    21     <xsl:param name="xhref" select="@xlink:href"/>
    22     <!-- is the @xlink:href a local idref link? -->
    23     <xsl:param name="xlink.idref">
    24       <xsl:if test="starts-with($xhref,'#') and (not(contains($xhref,'('))
    25                     or starts-with($xhref, '#xpointer(id('))">
    26         <xsl:call-template name="xpointer.idref">
    27           <xsl:with-param name="xpointer" select="$xhref"/>
    28         </xsl:call-template>
    29       </xsl:if>
    30     </xsl:param>
    31     <xsl:param name="xlink.targets" select="key('id',$xlink.idref)"/>
    3221    <xsl:param name="linkend.targets" select="key('id',@linkend)"/>
    33     <xsl:param name="target" select="($xlink.targets | $linkend.targets)[1]"/>
     22    <xsl:param name="target" select="$linkend.targets[1]"/>
    3423      <!-- Added role variable -->
    3524    <xsl:variable name="role" select="@role"/>
     
    8675          <xsl:message>
    8776            <xsl:text>ERROR: xref linking to </xsl:text>
    88             <xsl:value-of select="@linkend|@xlink:href"/>
     77            <xsl:value-of select="@linkend"/>
    8978            <xsl:text> has no generated link text.</xsl:text>
    9079          </xsl:message>
Note: See TracChangeset for help on using the changeset viewer.