Forum Stats

  • 3,826,739 Users
  • 2,260,701 Discussions
  • 7,897,066 Comments

Discussions

Problem characters for tocitems...

Another problem:

I have characters such as:
- "<", ">", "&"

in my titles. These I code as:
- &lt; , &gt;, &amp;

As you can see below:
..
<tocitem text="The &lt;helpbook&gt; Tag">
<tocitem text="The &lt;helpbook&gt; Tag" target="Helpbook3N109_htm"/>
<tocitem text="The &lt;cprojstyle&gt; Tag" target="Helpbook3N110_htm"/>

...

However, they then get displayed as &lt; and &gt; rather than converted.
If I instead use <,>, and &, and try to use HelpSetDemo, I get:
..
C:\ohelp\bin>helpsetdemo
View passed to RootItemModel does not contain data in TopicTree format.
java.lang.StringIndexOutOfBoundsException: String index out of range: -7
at java.lang.String.substring(String.java:1476)
at oracle.help.common.xml.XMLTokenizer.nextToken(Unknown Source)
at oracle.help.common.xml.XMLParser.<init>(Unknown Source)
at oracle.help.engine.XMLTOCEngine.createDataObject(Unknown Source)
at oracle.help.engine.XMLTOCEngine.createDataObject(Unknown Source)
...


Comments


  • Paul,

    Currently OHJ doesn't support character entities like &lt; and &gt;
    in our XML control files. In the OHJ 4.2 branch we want to replace
    the custom XML parser that we are using with something a little more
    standard (the benefit of the current parser was that it was only 6k
    in size). However the lack of support of entities and it's poor
    handling of extra whitespace is reason enough for us to look into
    an alternative.
This discussion has been closed.