Fran?oise Caillibot wrote:
> hello,
> I am running XMLmind XML Editor Standard Edition V2.5p1 to create 
> DocBook document.
> When I am trying to add a mediaobject with caption, I can't add text in 
> caption without a "para" element.
> This is xxxx with DocBook's DTD:
> 
>> /cf http://docbook.org/tdg/en/html/caption.html/
>>
>> caption ::=
>> (*#PCDATA*|calloutlist|glosslist|itemizedlist|orderedlist|
>>  segmentedlist|simplelist|variablelist|caution|important|note|tip|
>>  warning|literallayout|programlisting|programlistingco|screen|
>>  screenco|screenshot|formalpara|para|simpara|blockquote)*
> 
> in dbcentx.mod file, I note:
> *<!ELEMENT caption %ho; (%textobject.mix;)*>
> 
> *and *%textobject.mix* is defined by:
> 
>> /cf dbpoolx.mod:/
>> <!ENTITY % textobject.mix
>>         "%list.class;        |%admon.class;
>>         |%linespecific.class;
>>         |%para.class;        |blockquote
>>         %local.textobject.mix;">
> 
> 
>> /http://www.docbook.org/tdg/en/html/pe-mix-x.html/
>>
>> %textobject.mix;
>> Parameter Entity (Expanded)
>> calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist
>>         |simplelist|variablelist        
>>  |caution|important|note|tip|warning
>>         |literallayout|programlisting|programlistingco|screen
>>         |screenco|screenshot
>>         |formalpara|para|simp
> 
> 
> 
> I suppose  that* *dbcentx.mod file must look like:
>  <!ELEMENT caption %ho; (*#PCDATA | *%textobject.mix;)*>
> *
> *Is it true?
> Is there any correction available on your web site?

Sorry but I don't see where is the problem and therefore what to fix.

If the content model of the caption element allowed to contain #PCDATA, 
XXE would have been happy to allow you to type text directly in the caption.

You have seen by yourself (in the DTD 4.1+) that the content model of 
the caption element does not contain #PCDATA.

We, XMLmind, have not changed the content model of the caption element, 
or *of any other element*. (We have just added xml:space="preserve" to 
programlisting and al.)

You have 2 solutions:

* Report a bug to the author of DBTDG because it is the DTD which rules.

* OR define entity "%local.textobject.mix" to add #PCDATA and after 
that, use your customized DTD with XXE. This will work fine except that 
you'll no longer produce interchangeable DocBook documents.


---
PS: the content model used by XXE can be explored by selecting an 
element and using "Help|Show Content Model" (shortcut Shift-F1).
Try it, you'll like it.


Reply via email to