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: <classsynopsis> -> HTML problem


Hi,

as I'm still trying to figure out how to do what I want (and, for that
matter, trying to figure out what I want as well), I wasn't entirely
sure where the problem is (me, the tool, or the stylesheet).

So, I have this simple class synopsis:

  <classsynopsis language="c++">
    <ooclass>
      <modifier>class</modifier>
      <classname>CSRenderer</classname>
    </ooclass>
    <ooclass>
      <modifier>public</modifier>
      <classname>CSObject</classname>
    </ooclass>
  </classsynopsis>

I use this command line tool to compile it to HTML:

xsltproc --output Compiled/HTML/ \
         --stringparam use.extensions 0 \
         --stringparam chunk.first.sections 1 \
         /usr/share/xml/docbook/stylesheet/nwalsh/html/chunk.xsl \
	 Library.docbook

This is on a Debian Linux box, with the docbook stuff and tools
"as provided" by Debian. If you need version numbers I might be
able to find something somewhere.

The HTML output looks like this:
   class CSRenderer: , public CSObject { }

Not the spurious ",". After trying to find some hints on the net,
then looking for some other source of help I ended up on the
IRC channel, and got the information that

- the markup seems to be as it should

- the stylesheet unconditinally adds a "," in front of any oclass
  that has a sibling:

> < MikeSmith> so, I find in the code that a comma is unconditionally
> added before any classname element whose closest preceding sibling
> is a classname element 
> ...
> < MikeSmith> so that comma is actually being generated because
> commas are generated for _ooclass_ element that has any preceding
> sibling at all

I've added a simple workaround now to my compile script, postprocessing
the resulting HTML:

> sed -e "s/: , <span class=\"ooclass\">/ : <span class=\"ooclass\">/g" -i Compiled/HTML/*.html

But obviously, this should not be the correct solution to the problem,
and it won't work when I add a docbook compile to the Visual Studio
project.

So...
- if that's a bug, feel free to fix it :-)
- if that's a bug, and it has been fixed already, blame me for using
  Debian, then I can blame Debian for providing an old stylesheet.
- if it's not a bug, what would be the correct markup for a C++ style class?
- Is there another workaround? Maybe markup the class using something
  entirely different? [ This is standalone documentation; I don't currently
  intend to either generate documentation from sourcecode or to generate
  sourcecode from docbook files, as these things get really messy really fast ]

Thanks for any insights,
  Christian


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