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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Mixing my vocabularies

[ Lists Home | Date Index | Thread Index ]

Hi Mark,

> Can I inter-mix other vocabularies with an XML Schema defined vocabulary in an instance document, and still have a valid document? If so, how?
>
> N.B. the answer should ideally not involve any changes to the XML schema, just to the conformant document (e.g. I cannot use <xsd:anyAttribute namespace="##other"/>, etc).

If you want to use XML Schema then the only way to get an "open" document (allows you to add elements and attributes not declared in the schema) is to use the wildcard facility (xs:any and
xs:anyAttribute). This means that you need to include these in the XML Schema but that's not necessarily that hard to do. You can for example create an abstract base type that is a wildcard type
and then derive all other types from this type which would create an "open" document.
If you don't mind trying a different schema language Schematron is open by default which means you can do these things by default.

Cheers,
/Eddie






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS