xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Cristian Bina" <geo...@sync.ro>
Subject Re: src-resolve.4: Components from namespace 'http://www.w3.org/2001/XMLSchema' are not referenceable from schema document
Date Tue, 15 Apr 2003 06:35:50 GMT
Hi,

The problem is with your schema. If you will try to validate it you will get
a lot of errors like:
    E s4s-elt-schema-ns: The namespace of element 'schema' must be from the
schema namespace. (4:41)
The current version of W3C XML Schema has the following namespace:
    http://www.w3.org/2001/XMLSchema (instead of
http://www.w3.org/2000/10/XMLSchema)
After you correct this you will get  another error:
    E src-resolve.4.2: Components from namespace
'http://www.w3.org/2001/XMLSchema' are not referenceable from schema
document 'file:/.... (9:22)
This is because the timeInstant is no longer present in the primitive data
types:
    http://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes

Hope that helps,
 George
-------------------------------------------------------------
George Cristian Bina mailto:george@sync.ro
COO - sync.ro
Phone  +40-(0)251-461480, +40-(0)251-461481
Fax       +40-(0)251-461482
Mobile +40-(0)723-224067
SyncRO Soft srl, Bd N. Titulescu 170, Craiova, 1100 - Romania
http://www.sync.ro
<oXygen/> XML Editor - http://www.oxygenxml.com/


----- Original Message -----
From: <yr11@daimlerchrysler.com>
To: <xerces-j-dev@xml.apache.org>
Sent: Monday, April 14, 2003 10:35 PM
Subject: src-resolve.4: Components from namespace
'http://www.w3.org/2001/XMLSchema' are not referenceable from schema
document


> Why am I getting the following error when trying to validate the following
> XML with the attahced XML Schema.
>
> XML
>
> <?xml version = "1.0" encoding = "UTF-8"?>
> <Response type = "ack">
>       <ResponseDate>2000-08-16T14:31:59</ResponseDate>
>       <ProviderID>HAF</ProviderID>
>       <DCFSApplicationID>1234567890123</DCFSApplicationID>
> </Response>
>
> SCHEMA
>
> <?xml version = "1.0" encoding = "UTF-8"?>
>
> <xsd:schema xmlns:xsd = "http://www.w3.org/2000/10/XMLSchema"
>        elementFormDefault = "qualified">
>       <xsd:element name = "Response">
>             <xsd:complexType>
>                   <xsd:sequence>
>                         <xsd:element name = "ResponseDate" type
> = "xsd:timeInstant"/>
>                         <xsd:element name = "ProviderID">
>                               <xsd:simpleType>
>                                     <xsd:restriction base = "xsd:string">
>                                           <xsd:enumeration value = "HAF"/>
>                                           <xsd:enumeration value = "AFS"/>
>                                     </xsd:restriction>
>                               </xsd:simpleType>
>                         </xsd:element>
>                         <xsd:element name = "DCFSApplicationID">
>                               <xsd:simpleType>
>                                     <xsd:restriction base = "xsd:string">
>                                           <xsd:maxLength value = "13"/>
>                                           <xsd:minLength value = "13"/>
>                                     </xsd:restriction>
>                               </xsd:simpleType>
>                         </xsd:element>
>                         <xsd:element name = "ProviderApplicationID"
> minOccurs = "0">
>                               <xsd:simpleType>
>                                     <xsd:restriction base = "xsd:string">
>                                           <xsd:maxLength value = "15"/>
>                                           <xsd:minLength value = "15"/>
>                                     </xsd:restriction>
>                               </xsd:simpleType>
>                         </xsd:element>
>                         <xsd:element name = "ErrorMessage" type
> = "xsd:string" minOccurs = "0"/>
>                         <xsd:element name = "Decision" type
> = "DecisionType" minOccurs = "0"/>
>                   </xsd:sequence>
>                   <xsd:attribute name = "type" use = "required">
>                         <xsd:simpleType>
>                               <xsd:restriction base = "xsd:string">
>                                     <xsd:enumeration value = "ack"/>
>                                     <xsd:enumeration value = "decision"/>
>                                     <xsd:enumeration value = "invalid"/>
>                                     <xsd:enumeration value = "resend"/>
>                               </xsd:restriction>
>                         </xsd:simpleType>
>                   </xsd:attribute>
>             </xsd:complexType>
>       </xsd:element>
>       <xsd:complexType name = "DecisionType">
>             <xsd:sequence>
>                   <xsd:element name = "GoodThru" type = "xsd:date"
> minOccurs = "0"/>
>                   <xsd:element name = "Term" type = "xsd:positiveInteger"
> minOccurs = "0"/>
>                   <xsd:element name = "Tier" type = "xsd:string" minOccurs
> = "0"/>
>                   <xsd:element name = "LoanAmount" minOccurs = "0"
> maxOccurs = "2">
>                         <xsd:complexType>
>                               <xsd:simpleContent>
>                                     <xsd:extension base = "xsd:double">
>                                           <xsd:attribute name = "type" use
> = "required">
>                                                 <xsd:simpleType>
>                                                       <xsd:restriction
base
> = "xsd:string">
>
> <xsd:enumeration value = "min"/>
>
> <xsd:enumeration value = "max"/>
>                                                       </xsd:restriction>
>                                                 </xsd:simpleType>
>                                           </xsd:attribute>
>                                     </xsd:extension>
>                               </xsd:simpleContent>
>                         </xsd:complexType>
>                   </xsd:element>
>                   <xsd:element name = "APR" type = "xsd:double" minOccurs
> = "0"/>
>                   <xsd:element name = "Payment" type = "xsd:double"
> minOccurs = "0"/>
>                   <xsd:element name = "Stipulation" type = "xsd:string"
> minOccurs = "0" maxOccurs = "6"/>
>                   <xsd:element name = "Condition" type = "xsd:string"
> minOccurs = "0" maxOccurs = "4"/>
>                   <xsd:element name = "Comments" type = "xsd:string"
> minOccurs = "0"/>
>             </xsd:sequence>
>             <xsd:attribute name = "status" use = "required">
>                   <xsd:simpleType>
>                         <xsd:restriction base = "xsd:string">
>                               <xsd:enumeration value = "approved"/>
>                               <xsd:enumeration value = "declined"/>
>                               <xsd:enumeration value = "pending"/>
>                         </xsd:restriction>
>                   </xsd:simpleType>
>             </xsd:attribute>
>       </xsd:complexType>
> </xsd:schema>
>
> CODE
>
>             try
>             {
>                   parser=(XMLReader)Class.forName(PARSER_NAME).newInstance
> ();
>
>                   parser.setFeature
> ( "http://xml.org/sax/features/validation",true);
>                   parser.setFeature
> ( "http://xml.org/sax/features/namespaces",true);
>                   parser.setFeature
> ( "http://apache.org/xml/features/validation/schema",true);
>                   parser.setFeature
> ( "http://apache.org/xml/features/validation/schema-full-checking",true);
>                   parser.setFeature
> ("http://apache.org/xml/features/continue-after-fatal-error",true);
>                   parser.setFeature
> ("http://apache.org/xml/features/validation/dynamic", false);
>
>                   parser.setProperty
>
("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation
",schemaLocation);
>
>             }
>             catch(SAXException se)
>             {
>                   System.out.println(se);
>             }
>
> Sincerely,
> Yarram Reddy
> WebACE
> Tie/L:870-5968
> OutsideLine:(248) 427-5968
> Email:YR11@daimlerchrysler.com
> Pager: 313 714 5169 or YR11-page@dcx.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Mime
View raw message