[relaxng-user] problems with trang making xsd, mixed="true"

Eric van der Vlist vdv at dyomedea.com
Tue Nov 30 10:37:23 ICT 2004


Hi,

On Tue, 2004-11-30 at 18:15 +0900, Atsushi Eno wrote:
> Hello,
> 
> Eric, I don't think you (and MS implementation) are right. Read
> the description of {content type} in 3.4.2 "Complex Type
> Definition with complex content Schema Component" (well, I know
> you must have read there so many times :-)

Too many times yes!

> In 3.2.1, it specifies that in case of extension and it's
> effective content is empty, then its {content type} is "the
> {content type} of the type definition -resolved- to by the
> -actual value- of the base [attribute]".

Hmmm.... I had read Sebastian's snippet too fast and had missed the fact
that in that case the extension is adding only attributes and that we
are in the case where the "effective content is empty". 

You're right, in that specific case it seems that the mixed attribute
may be omitted on the extension and the schema generated by trang seems
to be valid. 

> Note that this is the definition, and once {content type} is
> computed, "effective content" is nothing to do with the
> constraints on complex type component.
> 
> So in this case, the derived type's {content type} must not be
> different from that of base type by definition.
> 
> I'll report this bug to MS later, unless it turns out that
> I am wrong.

I don't think so. It seems that the mixed attribute would need to be
specified if the extension was adding elements but that it is optional
when the extension is adding only attributes.

Eric

> Atsushi Eno
-- 
Read me on XML.com.
                                            http://www.xml.com/pub/au/74
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



More information about the relaxng-user mailing list