Daniel Dekany wrote:
>> The problem seems specific to DocBook 5, and more precisely to
>> indentation when the document being saved conforms to a RELAX NG Schema.
>> If you turn indentation off, you should be able to save your document in
>> no time (less than 50ms).
>>
>> This is clearly a problem, but we currently don't see how to improve the
>> performance[*] of XXE in this case and we currently do not plan to save
>> documents in a background thread.
> 
> I don't quite get what the problem is. Is it that in the most generic
> case, an element of a given name can have totally different meaning
> ("type") depending on what context it occurs? 

Yes.



> But for most practical
> XML schemas you had to indent all elements with the similar name on
> the same way, regardless of where it occurs, so just looking up the
> element name in a hash would be sufficient. (OK, in some mean schemas,
> making a second decision based on the parent elements is needed, but
> that's rare anyway, so it shouldn't affect the performance much.) Doesn't
> this stand for DocBook 5?
> 

XXE is not a DocBook editor. It has no intrinsic knowledge of DocBook 4
or DocBook 5. Everything it does depends on the schema of the document
being edited.

In the case of RELAX NG (DocBook 5), the content type of an element
having a given name may depend on quite complex conditions. What follows
is just a very simple example of what you can do with RELAX NG:

<div class="section">
  <div class="title">Title of the section</div>
  <div class="paragraph">Blah, blah, blah.</div>
  <div class="paragraph">Blah, blah, blah.</div>
  <div class="paragraph">Blah, blah, blah.</div>
</div>

Indeed, DocBook 5 does not use the above scheme, but it uses other
advanced RELAX NG features. However, whether a specific RELAX NG schema
uses advanced features or not has no effect on XXE which always needs to
cope with RELAX NG in its generality. More information in "XMLmind XML
Editor - Support of RELAX NG Schemas"
http://www.xmlmind.com/xmleditor/_distrib/doc/rngsupport/index.html

This being said, as always, we'll try to improve the situation.




Reply via email to