[relaxng-user] Converting Relax-NG to Schema and DTD

David Tolpin dvd at davidashen.net
Tue Jan 13 19:36:47 ICT 2004


[ Charset ISO-8859-1 unsupported, converting... ]
> Hi David,
> 
> Thanks for your help.
> 
> David Tolpin wrote:
> 
> >>Some of them I could work around, but others I have trouble seing the 
> >>problem right away.
> >>    
> >>
> >Which ones?
> >  
> >
> E.g.: 'sorry, cannot handle this kind of "group"'.
> This refers to an element definition with an optional attribute, an 
> optional element child and text, like this:
> <element name="...">
>   <optional><attribute name="...">...</attribute></optional>
>   <optional><element name="...">...</element></optional>
>   <text/>
> </element>
> 
> I guess the problem is the order with the optional first element child 
> and the text?
> 

In XML DTD, text cannot be ordered with elements. Either the content is 'mixed',
or it is not. Change occurences of:

<element>
   <element/>
   <text/>
</element>

to 

<element>
     <mixed>
       <element/>
     </element>
</element>

Of course, in a transformation, not manually.

David


  



More information about the relaxng-user mailing list