XHTML in Docbook is escaped in generated HTML

Achim
Posts: 3
Joined: Wed Aug 20, 2014 8:22 pm

XHTML in Docbook is escaped in generated HTML

Post by Achim »

Hello,

I have a DocBook file with embedded XHTML (like xhtml:div). This HTML is escaped in the resulting output of a transformation to HTML.

Now I'm wondering if it is possible to avoid the escaping and how to remove the namespace in a way that Oxygen can work with it.

The DocBook file is generated by Oxygen as the documentation from a XML Schema. The XHTML is used in the annotations in the XML Schema file and not escaped in the DocBook file.

Any hint is appreciated.

Cheers,
Achim
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: XHTML in Docbook is escaped in generated HTML

Post by sorin_ristache »

Hello,

You should use HTML tags or XHTML tags in the <annotation> elements of the XML Schema only if you plan to generate HTML output from that XML Schema. The HTML tags in the schema annotations are passed through to the HTML output (which means they are not escaped, they are just copied over to the HTML output) if you uncheck the option called Escape XML content on the Settings tab of the dialog box for schema documentation. So you should remove the xhtml: namespace prefix from the XHTML tags in the XSD schema annotations, for example:

Code: Select all

  <xs:documentation><div><b>Defines the personnel as a collection of person elements.</b></div></xs:documentation>
If you plan to generate an intermediary Docbook XML document you should use plain text in the schema annotations, not HTML tags or XHTML tags, because the Docbook XML output format is intended for further customizations applied to the final output format of the schema documentation, customizations applied using Docbook XML tags and/or Docbook XSLT stylesheets. So in this case you apply your customizations to the Docbook XML intermediary document, for example by manually marking up the annotation text with Docbook tags like <emphasis>, or by applying an XSLT stylesheet to this intermediary Docbook XML document.


Regards,
Sorin
Post Reply