General XMetaL Discussion

  • tonys

    Schema problem

    Participants 2
    Replies 3
    Last Activity 10 years, 9 months 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.)

    Reply

    Derek Read

    Reply to: Schema problem

    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.

    Reply

    tonys

    Reply to: Schema problem

    Thanks, Derek.

    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!

    Reply

    Derek Read

    Reply to: Schema problem

    Yes, if you have control of the schema then this seems like an easy fix on your side.
    It is wrong behaviour though, so I've logged it with development as a bug.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support