OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] xalan and ulink

On Mon, Oct 20, 2003 at 03:59:01PM -0700, Marius Scurtescu wrote:
> Hi,
> I brought this issue up the other week and I am
> mentioning it again just for the record.
> Using Xalan 2.5.1 under Win2K and the 1.62.4 
> XHTML stylesheets will generate broken <a>
> tags. The HTML stylesheets do not have this
> problem, quite strange since the template converting
> the ulink to an <a> tag is almost the same.
> The problem seems to be with the generation of the
> <a> tag into a temporary variable, it is at this
> stage that it gets broken. The ulink template is
> in the xref.xsl file.
> I tried all kind of permutations and changes to
> the template without success. It looks like the
> first attribute of the <a> tag will always have
> both the name and value missing ( ="").
> This is a known bug of Xalan, here is the report:
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22564
> I will let you know if a future version fixes this.

Well, I can confirm that this same bug manifests
itself on Linux as well, and it also appears
in version 2.4.1 of Xalan.  The difference between
the html and xhtml versions must be because the
output type is "xml" rather than "html".  The
bug must be in the xml serializer.

It does indeed appear to be the diversion into a 
variable that is the problem for Xalan.  This customization
eliminates the variable (it is useful only when Saxon
is the processor, using a saxon extension):

<xsl:template match="ulink" name="ulink">
      <xsl:if test="@id">
        <xsl:attribute name="id">
          <xsl:value-of select="@id"/>
      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
      <xsl:if test="$ulink.target != ''">
        <xsl:attribute name="target">
          <xsl:value-of select="$ulink.target"/>
        <xsl:when test="count(child::node())=0">
          <xsl:value-of select="@url"/>


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]