Roger Shuttleworth wrote:
> Thanks for your reply. I have attached the XML file and its XSL. Before
> you spend too much time on it, I should say that I am no expert at XML
> or XSL, so you may find all kinds of things done the wrong way. Also,
> the XML was output from FrameMaker; the files are still in an
> experimental stage (I am learning as I go), and neither the XSL nor the
> output rules are yet complete, so there are elements such as <indexterm>
> that are not yet handled correctly.
> 
> To answer the suggestions you made:
> 
> I don't have any xml:space attributes anywhere.
> The stylesheet reference does specify "text/xsl".
> 
> Since posting my message I have upgraded to 2.4 but the problem
> persists. I also tried deleting the two graphic elements in the first
> paragraph, and that seemed to solve the problem, but I don't know why
> (or indeed how to put them back without making it happen again).
> 
> So plese don't feel you have to spend a lot of time on this. I
> appreciate your help. Have a good holiday!

Sorry for being so late to answer: I was in vacations for the last 2 weeks.

The problem comes from the fact that XXE thinks that your document is a 
DocBook document because the name of the root element is "chapter", 
which is absolutely not the case!

This behavior is specified in 
<XXE_install_dir>/config/docbook/docbook.xxe. Please, edit this file and 
replace:

---
   <detect>
     <and>
       <or>
        <rootElementLocalName>book</rootElementLocalName>
        <rootElementLocalName>article</rootElementLocalName>
        <rootElementLocalName>chapter</rootElementLocalName>
        <rootElementLocalName>appendix</rootElementLocalName>
        <rootElementLocalName>section</rootElementLocalName>
        <rootElementLocalName>sect1</rootElementLocalName>
        <rootElementLocalName>sect2</rootElementLocalName>
        <rootElementLocalName>sect3</rootElementLocalName>
        <dtdPublicId substring="true">DTD DocBook XML</dtdPublicId>
        <dtdPublicId substring="true">DTD DocBook EBNF</dtdPublicId>
       </or>
       <rootElementNamespace xsi:nil="true" />
       <not>
         <dtdPublicId substring="true">Simplified</dtdPublicId>
       </not>
     </and>
   </detect>
---

by:

---
   <detect>
     <and>
       <or>
        <dtdPublicId substring="true">DTD DocBook XML</dtdPublicId>
        <dtdPublicId substring="true">DTD DocBook EBNF</dtdPublicId>
       </or>
       <rootElementNamespace xsi:nil="true" />
       <not>
         <dtdPublicId substring="true">Simplified</dtdPublicId>
       </not>
     </and>
   </detect>
---

then restart XXE and you should be able to open your file (provided you 
can access "app/userguide.dtd").

I'll make the "detect" element smarter for next release to avoid 
problems such as yours.

Of course, Security.xml is displayed using a tree view because no CSS 
style sheet has been specified. (XXE does not use XSL for display on 
screen.)

Note that roger.css is not usable to style the Security.xml because it 
does not contain rules which match the elements of Security.xml. This is 
not specific to XXE: roger.css is simply not usable to style instances 
of userguide.dtd.


Reply via email to