OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng] Trang XSD output





> I was a little surprised that elements with <text/> content were
translated
> to have mixed content in the Trang XSD output. For example:
>
> <element name="day">
>  <text/>
> </element>
>
> becomes
>
> <xs:element name="day">
>   <xs:complexType mixed="true"/>
> </xs:element>

I believe that's correct.

> which is an implicit anyType.

Are you sure?  My understanding is that:

  <xs:complexType/>

is short for

  <xs:complexType>
    <xs:complexContent>
      <xs:restriction base="xs:anyType">
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

which allows neither attributes, child elements not child text nodes, and
thus that

  <xs:complexType mixed="true"/>

allows just child text nodes and hence is equivalent to

  <text/>

in RELAX NG.  I may be wrong -- I often find I misunderstand XSD -- but both
MSXML and XSV seem to agree with me (the version of MSV I tried doesn't
though).

> I suppose this is an early, alpha version approach that will fade away in
> later versions.

Only if somebody reports them.

James




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC