You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Anoop Singh Saharan <an...@wipro.com> on 2001/10/03 12:24:36 UTC

Schema-Validation with xerces1.4.3

Hi All,
I am validating a xml document with Schema,
but getting the following error message 
  Message: Error: constraint 3.x.3: Invalid attribute value for 'use' in element
 'attribute': the value 'default' must match (optional | prohibited | required).
org.xml.sax.SAXException: Error encountered

My XML File is like this=====
<?xml version="1.0" encoding="UTF-8"?>
<ECTechInfoResponse xmlns="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.w3.org/namespace/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/namespace/ d:\ECTechInfoResponse.xsd">

Schema File is like this=====
<schema targetNamespace="http://www.w3.org/namespace/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:t="http://www.w3.org/namespace/">
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="./xml.xsd" />
 <element name="ECTechInfoResponse">
  <complexType>
   <sequence>
    <element ref="t:CommonProps"/>
    <element ref="t:QdKey" minOccurs="0"/>
..........etc.......................
</<schema>

Any help would be appreaiated .
Thanks & Regards
Anoop Singh