DESPERATION: Trying to include the DTD into a schema!

Hello!

(I would eternally appreciate a reply to this message to cmerighe@natr.com).


I do not know whom I should direct this question to, but I have come to a
dead end trying to use parts of mathml into my schema.

I am trying to include the "mrow" element inside an element declarion in a
schema file.   I read the information on
http://www.w3.org/TR/MathML2/appendixa.html#parsing_doctype ; however, it
does not tell me whether or not I can include the elements from the DTD for
mathml in a schema (xsd) file.

If you can help me with this issue, or give me a name and email address, or
some other place, I would appreciate.  I am new to XML and trying to avoid
having to reinvent the wheel by incorporating the mathml elements inside my
schema.

Allow me to specify what it is that I want to accomplish:

Given my schema (xcomm.xsd):

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.nsp.com/XCOMM1.0"
            xmlns="http://www.nsp.com/XCOMM1.0"	    
            elementFormDefault="qualified">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            XCOMM 1.0 data schema.
        </xsd:documentation>
    </xsd:annotation>
    <!-- Define the root element: XCOMM -->
    <xsd:element name="XCOMM">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Field" type="FieldType" minOccurs="0"
maxOccurs="unbounded"/>		
            </xsd:sequence>  
        </xsd:complexType>
    </xsd:element>
    <!-- Define the FieldType type -->
    <xsd:complexType name="FieldType">
        <xsd:attribute name="Name" type="xsd:string" use="required"/>

        <xsd:attribute name="Select" type="xsd:string" use="optional"/>

    </xsd:complexType>
</xsd:schema>

I would like to add "mrow", from mathml.  So I re-wrote the schema above
like this:

<?xml version="1.0"?>
<!DOCTYPE mml:math 
    SYSTEM "mathml2.dtd" [
    <!ENTITY % MATHML.prefixed "INCLUDE">
    <!ENTITY % MATHML.prefix "mml">
]>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.nsp.com/XCOMM1.0"
            xmlns="http://www.nsp.com/XCOMM1.0"	    
            elementFormDefault="qualified">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            XCOMM 1.0 data schema.
        </xsd:documentation>
    </xsd:annotation>
    <!-- Define the root element: XCOMM -->
    <xsd:element name="XCOMM">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Field" type="FieldType" minOccurs="0"
maxOccurs="unbounded"/>		
	     <xsd:element ref="mml:mrow"/>		
            </xsd:sequence>  
        </xsd:complexType>
    </xsd:element>
    <!-- Define the FieldType type -->
    <xsd:complexType name="FieldType">
        <xsd:attribute name="Name" type="xsd:string" use="required"/>

        <xsd:attribute name="Select" type="xsd:string" use="optional"/>

    </xsd:complexType>
</xsd:schema>

PROBLEM:  XML Spy does not recognize <xsd:element ref="mml:mrow"/>



I have come to a dead end!

Thanks!

Carlos.

Received on Monday, 8 April 2002 16:41:37 UTC