[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] closing <a name> tag
Marie Sauvage - EBM WebSourcing wrote:
> <xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
> <a name="{$id}">.</a>
> </xsl:if>
> but when I put no content (or a space) between opening and closing
tag (instead of the point here), it's written in my html generated file
like before with simply <a name="xxx" />. Do you know what does it ? I'm
using Ant and Xalan, is it it ? Do you know a way to force this ?
> I'll maybe have a look in an ant regex replacement...
From the XML point of view, <a></a> and <a /> are totally equivalent.
There's no way in XSLT to enforce one of these outputs.
A single space is stripped from the stylesheet, so using
<a name="{$id}"> </a>
won't help.
However
<a name="{$id}"><xsl:text> </xsl:text></a>
should do it.
What I don't understand is, why <a name=.../> renders a link. There's no
href attribute. I've never heard that browsers have a problem with link
anchors.
Anyway, hope the xsl:text trick helps.
Oliver
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]