Re: schema error : undefined value for 'type' encountered

OK, here goes

1.    You're using the old Schema syntax. The new syntax has the namespace
URI http://www.w3.org/2000/10/XMLSchema. Specs can be found at[1,2 and 3]

2.    You don't have a targetNamespace attribute *and* the schema namespace
is in a default namespace declaration. This doesn't work! If you want the
types in your schema to be in 'no namespace' then you *must* provide a
namespace declaration with a prefix for the schema namespace and prefix your
elements accordingly. if you want the types in your schema to be in a
particular namespace then provide a targetNamespace attribute.

Martin Gudgin
DevelopMentor


----- Original Message -----
From: "anand awasthi" <anand-awasthi@usa.net>
To: <xmlschema-dev@w3.org>
Sent: Thursday, February 01, 2001 11:03 PM
Subject: schema error : undefined value for 'type' encountered


> hi,
>
>
> When i validate following schema in xml spy 3.5 editor, i am getting
following
> error for element 'option' in the given schema...
> i am not able to catch why its giving error. pls help me.
>
> the error is :
>
> schema error :   undefined value for 'type' encountered
>
>
> and schema which i am trying to validate is :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--W3C Schema generated by XML Spy v3.0.7 NT (http://www.xmlspy.com)-->
> <!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 19991216//EN" "" [
> <!ENTITY % p ''>
> <!ENTITY % s ''>
> ]>
> <schema xmlns="http://www.w3.org/1999/XMLSchema">
> <complexType name="fieldType" content="elementOnly">
> <sequence>
> <element name="option" type="optionType" minOccurs="0"
> maxOccurs="unbounded"/>
> </sequence>
> <attribute name="column" type="string"/>
> <attribute name="param" type="string" use="required"/>
> <attribute name="inputtype" use="default" value="TEXT">
> <simpleType base="NMTOKEN">
> <enumeration value="TEXT"/>
> <enumeration value="CHECKBOX"/>
> <enumeration value="TEXTAREA"/>
> <enumeration value="SELECT"/>
> <enumeration value="HIDDEN"/>
> <enumeration value="DATE"/>
> <enumeration value="PASSWORD"/>
> <enumeration value="RADIO"/>
> </simpleType>
> </attribute>
> <attribute name="datatype" use="default" value="CHAR">
> <simpleType base="NMTOKEN">
> <enumeration value="CHAR"/>
> <enumeration value="INTEGER"/>
> <enumeration value="NUMERIC"/>
> <enumeration value="DATE"/>
> <enumeration value="TIMESTAMP"/>
> </simpleType>
> </attribute>
> <attribute name="display" type="string"/>
> <attribute name="displayKey" type="string"/>
> <attribute name="size" type="string"/>
> <attribute name="maxlength" type="string"/>
> <attribute name="rows" type="string"/>
> <attribute name="value" type="string"/>
> <attribute name="defaultval" type="string"/>
> <attribute name="sourcetable" type="string"/>
> <attribute name="sourcekeycol" type="string"/>
> <attribute name="sourcedatacol" type="string"/>
> <attribute name="required" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> <attribute name="query" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> <attribute name="noupdate" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> <attribute name="keycolumn" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> <attribute name="hide" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> <attribute name="uppercase" use="default" value="0">
> <simpleType base="NMTOKEN">
> <enumeration value="0"/>
> <enumeration value="1"/>
> </simpleType>
> </attribute>
> </complexType>
> <element name="form">
> <complexType content="elementOnly">
> <sequence>
> <element name="field" type="fieldType" minOccurs="1"
> maxOccurs="unbounded"/>
> </sequence>
> <attribute name="bundle" type="string"/>
> <attribute name="xmlns:xsi" type="uriReference" use="default"
> value="http://www.w3.org/1999/XMLSchema-instance"/>
> <attribute name="xsi:noNamespaceSchemaLocation" type="string"/>
> <attribute name="xsi:schemaLocation" type="string"/>
> </complexType>
> </element>
> <complexType name="optionType" base="string">
> <attribute name="value" type="string" use="required"/>
> </complexType>
> </schema>
>
>
> pls help.
>
> thanks
>
>
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1

Received on Thursday, 1 February 2001 18:51:50 UTC