#61 EBNF and HTML links

closed-out-of-date
nobody
XSL (122)
5
2002-07-04
2002-05-15
Anonymous
No

Links from <nonterminal> elements when using the EBNF
module don't generate the correct hyperlinks.

1) Within a chunk, the href attribute of a
generated <a/> element needs a '#'

2) Between chunks, the href attribute also needs
the name of the chunk.

The following fixes these problems - in ebnf.xsl, at
the start of the template for a nonterminal element,
change the definition of the linkend variable from:

<xsl:variable name="linkend">
<xsl:call-template name="xpointer.idref">
<xsl:with-param name="xpointer" select="@def"/>
</xsl:call-template>
</xsl:variable>

to:

<xsl:variable name="linkend">
<xsl:value-of select="@def"/>
</xsl:variable>

Further down, the definition of the href variable
doesn't need the <xsl:otherwise> case - that is it now
reads:

<xsl:variable name="href">
<xsl:variable name="targets" select="key
('id',$linkend)"/>
<xsl:variable name="target" select="$targets
[1]"/>
<xsl:call-template name="href.target">
<xsl:with-param name="object"
select="$target"/>
</xsl:call-template>
</xsl:variable>

Discussion

  • Norman Walsh

    Norman Walsh - 2002-07-04

    Logged In: YES
    user_id=81663

    Fixed. Perhaps for a while.

     
  • Norman Walsh

    Norman Walsh - 2002-07-04
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks