On Fri, Mar 4, 2011 at 8:54 PM, Peter
Hi. I'm generating webhelp output using
the excellent contribution
from Kasun and David
uses the XHTML output stylesheets.
The empty anchor tags in my webhelp output have been collapsed
single empty element tags like this:
<a id="foo" />
This makes it hard to style links using CSS because some
don't think the <a /> element has ended and they apply
to all the following content (until an anchor element with a
closing tag is encountered). This doesn't happen for HTML
HTML output empty anchor elements have separate closing tags
I use Saxon 6.5.5 and I found this posting that indicates
closing tags are controlled by the output method:
The webhelp.xsl file in the DocBook webhelp distribution
the output method to HTML but I still see <a id="something"
/> in the
resulting XHTML. I'm not sure it's possible to convince Saxon
separate closing tags for empty elements in XHTML. Is anyone
generate XHTML with separate closing tags using Saxon?
We faced the same problem when we included the
<script> tag too, since it too has an empty tag when
including the JS src. We circumvented this issue by adding a
xsl comment like this.
May be this is not a solution for your usecase, but with
this you can get something
like <a id="anchorname"><!--some
I altered webhelp.xsl from the webhelp
distribution so that it imports
from the HTML directory instead of XHTML in DocBook XSL. Now
elements have separate closing tags and the resulting webhelp
work properly. Why was XHTML chosen for webhelp? Will
HTML cause problems that I haven't encountered yet?
The main issue with HTML is with the html-search feature.
To properly retrieve the content text excluding the html-tags,
the html files should be in a proper format. Strict XML is the
standard way for this. That's the concern here. I haven't
encountered any other major issue in switching to html!
Looking at your mail, I'm assume you are switching from
html to xhtml, right? If so, have you encountered any concerns
that needs some major effort? If so, tell us about it, we'll
see about the possibility of supporting to html format too.
Thanks for the compliments Peter! :)