General XMetaL Discussion
tonys January 4, 2012 at 11:55 pm
Schema problemJanuary 4, 2012 at 11:55 pmParticipants 2Replies 3Last Activity 11 years ago
I'm having a problem with the schema and XML document in the attached zip.
XMetaL says the document is invalid because the
element can't directly contain text. However, if I use libxml2 or Xerces-J they both claim the document is valid.
The critical thing is whether the mixed=”true” on the cell.type complex type is inherited by the complexContent which extends it. In section 3.4.2 of Part 1 of the XSD recommendation the definition of “effective mixed” seems to say that only the mixed attributes in the element definition should be used (i.e. mixed should not be inherited as part of the extension), but maybe there's something else that overrides this.
Can anyone confirm what is the correct behaviour? (IMHO the schema should be changed to put the mixed on the element definition, but that's not my call.)Derek Read January 5, 2012 at 11:26 pm
Reply to: Schema problemJanuary 5, 2012 at 11:26 pm
Our understanding of the primer suggests that the XMetaL Author (or XMAX) behavior is incorrect and that @mixed should be inherited.
Until we can rectify this in our parser, a temporary fix would be to move @mixed to the element declaration (at least for the XMetaL copy of the Schema).
Interesting that this is just now coming to light (no previous reports since we added Schema support in 2003). That suggests to me that this construction is uncommon (at least in any Schemas used by our clients). Not that that helps any here as it is a perfectly valid way to write a Schema.tonys January 6, 2012 at 1:25 am
Reply to: Schema problemJanuary 6, 2012 at 1:25 am
If I tell them they're doing something that no XMetaL users have done in the last 8 years they'll probably think it's a good idea to change it!
- You must be logged in to reply to this topic.