Page 1 of 1

Custom XML to Responsive Webhelp Index Page discarding HTML entities

Posted: Thu Jan 18, 2018 6:09 pm
by remip
Hello,
We are using custom XML fragment files when producing responsible webhelp with the oXygen webhelp plugin (19.1).
Unfortunately, it seems that the HTML entities either are discarded or prevent the parsing of the file.

By default, our localization software will convert any special characters to HTML entities to avoid malformed code in XML files.
Oxygen not parsing these entities is therefore an issue.

For instance:
  • > is discarded and the content is displayed without the ">" character

    Code: Select all

    「<b>ヘルプ > 最新情報</b>」より、いつでもご覧になれます。</p> 
  • &ndash; prevents the file to be rendered

    Code: Select all

    <p>© 2013&ndash;2017
Do you plan to expand the support for HTML entities in the XML fragments?

Regards,
Rémi

Re: Custom XML to Responsive Webhelp Index Page discarding HTML entities

Posted: Mon Jan 22, 2018 7:21 pm
by alin
Hello,

The XML fragment files should be well-formed in order to be parsed by the WebHelp Plugin. The only entities allowed in an well-formed XML file are the predefined entities ("&", "&apos;", """ , ">", "<") and the character entities ("&# decimal number ;" or "&#x Hexadecimal number ;").
The HTML entities you are referring to are named entities and they must be declared in the document prolog or in a DTD file in order for an XML parser to be able to recognize them.
For example if you want to use the "&ndash;" entity your XML fragment should look like this:

Code: Select all


<!DOCTYPE fragment [
<!ENTITY ndash "-">
]>
<p>© 2013&ndash;2017</p>
For more about XML Well-Formedness you may read this article from our User Guide: https://www.oxygenxml.com/doc/ug-editor ... formedness

Regards,
Alin