That's a loaded question, but the one I've got in mind is that it looks as
though 2.5 (and pretty much any other version) doesn't permit arbitrary XML
attributes to show up on an element declared as anyType.

This is incorrect behavior, as far as I understand it.

The interesting (and really weird) thing is that if you derive your own type
from anyType and add nothing, that new type *does* permit arbitrary
attributes to show up.

Schema snip:
<element name="AttributeValue" type="anyType">

Example that fails validation complaining about Scope attribute:
<AttributeValue Scope="foo">member</AttributeValue>

Schema fix:
<element name="AttributeValue" type="myType">
<complexType name="myType">
    <complexContent>
        <extension base="anyType"/>
    </complexContent>
</complexType>

I'm pretty sure that either both schemas should validate or invalidate that
example, but not one yes, one no. And I think the correct behavior is that
it should validate in both cases. Xerces-J behaves accordingly.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to