RE: using multiple namespaces in one element

I think the error message is complaining about an error in your instance
document which is nothing to do with the schema - you have used the prefix
mml in the instance without declaring it in an
xmlns:mml="http://www.w3.org/1998/Math/MathML" declaration.

Having fixed that, to get the instance validated against the MathML schema
you then need to do two things:

(a) use xsl:import in your schema document to import the schema for the
MathML namespace

(b) use processContents="strict" on the xs:any element to ensure that any
MathML elements matching the wildcard are validated against their schema
definitions.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Andreas Peter
> Sent: 09 July 2008 21:48
> To: XML Schema List
> Subject: using multiple namespaces in one element
> 
> 
> Hello list users,
> 
> I have an element which should contain elements from MathML. 
> The problem is when I include an MathML example into the 
> instance document the parser says that the prefix mml is not 
> bounded. MathML should only be possible inside of the 
> mathphrase element.
> 
>     <xs:element name="mathphrase">
>         <xs:complexType>
>             <xs:choice>
>                 <xs:any 
> namespace="http://www.w3.org/1998/Math/MathML" 
> minOccurs="0" maxOccurs="unbounded"/>
>             </xs:choice>
>         </xs:complexType>
>     </xs:element>
> 
> How can I include the whole MathML namespace into my schema?
> 
> I am thankful for every hint,
> 
> Andreas
> 

Received on Wednesday, 9 July 2008 21:26:54 UTC