W3C home > Mailing lists > Public > www-math@w3.org > April 2002

DESPERATION: Trying to include the DTD into a schema!

From: Carlos Merighe <CMerighe@natr.com>
Date: Mon, 8 Apr 2002 15:57:25 -0400 (EDT)
Message-ID: <1FA38D3D58DDD211B18300A024B358C003A56ED6@corp-exchange.nspnet.net>
To: "'ion@math.ams.org'" <ion@math.ams.org>
Cc: "'www-math@w3.org'" <www-math@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:51 GMT