Re: Converting Relax-NG to Schema and DTD

David Tolpin <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
[ 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.