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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xml-dev] The XQeryX schema and DTD is not valid



I copied the XQeryX schema from the W3C XQeryX Working Draft 07 June  2001 
and created a schema file.
I validated this schema with XML Spy and also with the IBM Schema Qualtity 
Checker.
It is not valid!
The same happened also with the DTD for XQueryX.

Is my version of the working draft outdated or much more important is there 
a valid version of the XQeryX schema
existing ?

I was a bit confused about this.
When W3C is not able to produce valid schemas who else ?

I attached the schema and the errors found by schema quality checker.

with kind regards
Michael Grünwald
Software Engineer


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
    <xsd:group name = "expression">
        <xsd:choice>
            <xsd:element ref = "variable"/>
            <xsd:element ref = "constant"/>
            <xsd:element ref = "function"/>
            <xsd:element ref = "flwr"/>
            <xsd:element ref = "elementConstructor"/>
            <xsd:element ref = "predicatedExpr"/>
            <xsd:element ref = "sortBy"/>
            <xsd:element ref = "ifThenElseExpr"/>
            <xsd:element ref = "quantifier"/>
            <xsd:element ref = "exprList"/>
            <xsd:element ref = "step"/>
            <xsd:element ref = "identifier"/>
            <xsd:element ref = "nodeKindTest"/>
        </xsd:choice>
    </xsd:group>
    <xsd:element name = "query">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "functionDefinition" minOccurs = "0" 
                        maxOccurs = "unbounded"/>
                <xsd:group ref = "expression"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "functionDefinition">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "argumentDeclaration" minOccurs = "0" 
                    maxOccurs = "unbounded"/>
                <xsd:group ref = "expression"/>
            </xsd:sequence>
            <xsd:attribute name = "functionName" use = "required" type = "xsd:string"/>
            <xsd:attribute name = "datatype" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "argumentDeclaration">
        <xsd:complexType>
            <xsd:attribute name = "name" use = "required" type = "xsd:string"/>
            <xsd:attribute name = "datatype" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "exprList">
        <xsd:complexType>
            <xsd:choice minOccurs = "0" maxOccurs = "unbounded">
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "predicatedExpr">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:group ref = "expression"/>
                <xsd:element ref = "predicate" maxOccurs = "unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "predicate">
        <xsd:complexType>
            <xsd:choice>
                <xsd:sequence>
                    <xsd:element ref = "rangeFrom"/>
                    <xsd:element ref = "rangeTo"/>
                </xsd:sequence>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "rangeFrom">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "rangeTo">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "variable" type = "xsd:string"/>
    <xsd:element name = "identifier" type = "xsd:string"/>
    <xsd:element name = "constant">
        <xsd:complexType>
            <xsd:simpleContent>
                <xsd:extension base = "xsd:string">
                    <xsd:attribute name = "datatype" type = "xsd:string"/>
                </xsd:extension>
            </xsd:simpleContent>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "function">
        <xsd:complexType>
            <xsd:choice minOccurs = "0" maxOccurs = "unbounded">
                <xsd:group ref = "expression"/>
            </xsd:choice>
            <xsd:attribute name = "name" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "flwr">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:choice maxOccurs = "unbounded">
                    <xsd:element ref = "forAssignment"/>
                    <xsd:element ref = "letAssignment"/>
                </xsd:choice>
                <xsd:element ref = "where" minOccurs = "0"/>
                <xsd:element ref = "return"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "forAssignment">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
            <xsd:attribute name = "variable" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "letAssignment">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
            <xsd:attribute name = "variable" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "where">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "return">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "ifThenElseExpr">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:group ref = "expression"/>
                <xsd:group ref = "expression"/>
                <xsd:group ref = "expression"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "sortBy">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:group ref = "expression"/>
                <xsd:element ref = "sortfield" maxOccurs = "unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "sortfield">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
            <xsd:attribute name = "order" use = "default" value = "ASCENDING">
                <xsd:simpleType>
                    <xsd:restriction base = "xsd:NMTOKEN">
                        <xsd:enumeration value = "ASCENDING"/>
                        <xsd:enumeration value = "DESCENDING"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "quantifier">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "quantifierAssignment"/>
                <xsd:group ref = "expression"/>
            </xsd:sequence>
            <xsd:attribute name = "type" use = "default" value = "SOME">
                <xsd:simpleType>
                    <xsd:restriction base = "xsd:NMTOKEN">
                        <xsd:enumeration value = "SOME"/>
                        <xsd:enumeration value = "EVERY"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "quantifierAssignment">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
            <xsd:attribute name = "variable" use = "required" type = "xsd:string"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "elementConstructor">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "tagName"/>
                <xsd:element ref = "attributeConstructor" minOccurs = "0" 
                    maxOccurs = "unbounded"/>
                <xsd:choice minOccurs = "0" maxOccurs = "unbounded">
                    <xsd:group ref = "expression"/>
                </xsd:choice>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "tagName">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element ref = "identifier"/>
                <xsd:element ref = "variable"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "attributeConstructor">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "attributeName"/>
                <xsd:element ref = "attributeValue"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "attributeName">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element ref = "identifier"/>
                <xsd:element ref = "variable"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "attributeValue">
        <xsd:complexType>
            <xsd:choice>
                <xsd:group ref = "expression"/>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "step">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:group ref = "expression"/>
                <xsd:group ref = "expression"/>
            </xsd:sequence>
            <xsd:attribute name = "axis" use = "required">
                <xsd:simpleType>
                    <xsd:restriction base = "xsd:NMTOKEN">
                        <xsd:enumeration value = "DEREFERENCE"/>
                        <xsd:enumeration value = "ANCESTOR"/>
                        <xsd:enumeration value = "ANCESTORORSELF"/>
                        <xsd:enumeration value = "ATTRIBUTE"/>
                        <xsd:enumeration value = "CHILD"/>
                        <xsd:enumeration value = "DESCENDANT"/>
                        <xsd:enumeration value = "DESCENDANTORSELF"/>
                        <xsd:enumeration value = "FOLLOWING"/>
                        <xsd:enumeration value = "FOLLOWINGSIBILING"/>
                        <xsd:enumeration value = "NAMESPACE"/>
                        <xsd:enumeration value = "PARENT"/>
                        <xsd:enumeration value = "PRECEDING"/>
                        <xsd:enumeration value = "PRECEDINGSIBLING"/>
                        <xsd:enumeration value = ""/>
                        <xsd:enumeration value = "SLASHSLASH"/>
                        <xsd:enumeration value = "SELF"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
            <xsd:attribute name = "abbreviated" use = "default" value = "true">
                <xsd:simpleType>
                    <xsd:restriction base = "xsd:NMTOKEN">
                        <xsd:enumeration value = "true"/>
                        <xsd:enumeration value = "false"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "dot">
        <xsd:complexType/>
    </xsd:element>
    <xsd:element name = "dotdot">
        <xsd:complexType/>
    </xsd:element>
    <xsd:element name = "nodeKindTest">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref = "piTargetTest" minOccurs = "0"/>
            </xsd:sequence>
            <xsd:attribute name = "kind" use = "required">
                <xsd:simpleType>
                    <xsd:restriction base = "xsd:NMTOKEN">
                        <xsd:enumeration value = "NODE"/>
                        <xsd:enumeration value = "TEXT"/>
                        <xsd:enumeration value = "COMMENT"/>
                        <xsd:enumeration value = "DATA"/>
                        <xsd:enumeration value = "PROCESSING_INSTRUCTION"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name = "piTargetTest" type = "xsd:string"/>
</xsd:schema>

Initializing Schema Quality Checker. Please wait ...
SchemaQualityChecker has been initialized
xqueryx.xsd (file 1 of 1) now being read ...
ERROR
file = file:C:/sqc/xqueryx.xsd line 169 column 79
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "use" with value "default" must have a value from the list 
"(prohibited|optional|required)".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 169 column 79
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "value" must be declared for element type "xsd:attribute".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 185 column 73
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "use" with value "default" must have a value from the list 
"(prohibited|optional|required)".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 185 column 73
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "value" must be declared for element type "xsd:attribute".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 274 column 80
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "use" with value "default" must have a value from the list 
"(prohibited|optional|required)".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 274 column 80
SEVERITY: 1
ERROR TYPE: 1
MESSAGE
Attribute "value" must be declared for element type "xsd:attribute".

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 268 column 54
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
"" is not of the type : simpleType http://www.w3.org/2001/XMLSchema:NMTOKEN.

   ------------------------------------------------------------------------
ERROR
file = file:C:/sqc/xqueryx.xsd line 268 column 54
SEVERITY: 1
ERROR TYPE: 2
MESSAGE
In the definition of <xsd:simpleType>
    <xsd:restriction base="xsd:NMTOKEN">
        <xsd:enumeration value="DEREFERENCE"/>
        <xsd:enumeration value="ANCESTOR"/>
        <xsd:enumeration value="ANCESTORORSELF"/>
        <xsd:enumeration value="ATTRIBUTE"/>
        <xsd:enumeration value="CHILD"/>
        <xsd:enumeration value="DESCENDANT"/>
        <xsd:enumeration value="DESCENDANTORSELF"/>
        <xsd:enumeration value="FOLLOWING"/>
        <xsd:enumeration value="FOLLOWINGSIBILING"/>
        <xsd:enumeration value="NAMESPACE"/>
        <xsd:enumeration value="PARENT"/>
        <xsd:enumeration value="PRECEDING"/>
        <xsd:enumeration value="PRECEDINGSIBLING"/>
        <xsd:enumeration value=""/>
        <xsd:enumeration value="SLASHSLASH"/>
        <xsd:enumeration value="SELF"/>
    </xsd:restriction>
</xsd:simpleType>
, <xsd:enumeration value="DEREFERENCE"/>

<xsd:enumeration value="ANCESTOR"/>

<xsd:enumeration value="ANCESTORORSELF"/>

<xsd:enumeration value="ATTRIBUTE"/>

<xsd:enumeration value="CHILD"/>

<xsd:enumeration value="DESCENDANT"/>

<xsd:enumeration value="DESCENDANTORSELF"/>

<xsd:enumeration value="FOLLOWING"/>

<xsd:enumeration value="FOLLOWINGSIBILING"/>

<xsd:enumeration value="NAMESPACE"/>

<xsd:enumeration value="PARENT"/>

<xsd:enumeration value="PRECEDING"/>

<xsd:enumeration value="PRECEDINGSIBLING"/>

<xsd:enumeration value=""/>

is not compatible with the following facets defined in one of the ancestors 
of <xsd:simpleType>
    <xsd:restriction base="xsd:NMTOKEN">
        <xsd:enumeration value="DEREFERENCE"/>
        <xsd:enumeration value="ANCESTOR"/>
        <xsd:enumeration value="ANCESTORORSELF"/>
        <xsd:enumeration value="ATTRIBUTE"/>
        <xsd:enumeration value="CHILD"/>
        <xsd:enumeration value="DESCENDANT"/>
        <xsd:enumeration value="DESCENDANTORSELF"/>
        <xsd:enumeration value="FOLLOWING"/>
        <xsd:enumeration value="FOLLOWINGSIBILING"/>
        <xsd:enumeration value="NAMESPACE"/>
        <xsd:enumeration value="PARENT"/>
        <xsd:enumeration value="PRECEDING"/>
        <xsd:enumeration value="PRECEDINGSIBLING"/>
        <xsd:enumeration value=""/>
        <xsd:enumeration value="SLASHSLASH"/>
        <xsd:enumeration value="SELF"/>
    </xsd:restriction>
</xsd:simpleType>
, specifically simpleType http://www.w3.org/2001/XMLSchema:NMTOKEN :
<xsd:pattern value="\c+"/>




   ------------------------------------------------------------------------