Petr Nalevka wrote:
> 
> I have a little issue with XML Mind when I declare DOCTYPE with DocBook
> 5.0 (<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
> "http://www.docbook.org/xml/5.0/dtd/docbook.dtd";>)
> 
> First of all, why am I actually declaring DOCTYPE with a DocBook 5.0
> document? The reason is I like to use XInclude with XPointer. But Xerces
> only supports DTD determined shorthand ids. 

That's right. But DocBook 5 uses the xml:id attribute to specify the ID
of an element, so a DTD (or any kind of schema) is not strictly needed
to properly process XInclude elements. You should send an RFE to Xerces
requesting it to support xml:id (http://www.w3.org/TR/xml-id/).



> So I actually attach DOCTYPE
> and use an XML Catalog.
> 
> I found a strange issue with XML Mind when the DOCTYPE is present. If I
> create a new section it gets created without an empty title and I need
> to add the title manually. If I detele the DOCTYPE sections are being
> inserted correctly with titles.
> 
> Any idea?
> 

Yes, I've added:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
"http://www.docbook.org/xml/5.0/dtd/docbook.dtd";>

to a DocBook 5 document and managed to reproduce the problem you describe.

The DocBook 5 DTD is not in sync with the DocBook 5 RELAX NG schema (the
normative schema of DocBook 5). The DocBook 5 DTD does not require a
section element to have a title child element. Therefore, the behavior
of XXE seems correct.

You can check this by selecting a section (in a DocBook 5 document
having a <!DOCTYPE>) and then by pressing Shift-F1 (Help|Show Content
Model). See attached screenshot.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: section_contents.png
Type: image/png
Size: 30802 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20090113/30195afa/attachment.png
 

Reply via email to