Unmarsheller Error : cvc-elt.1: Cannot find the declaration of element

hossein2801

New Member
I'm writing a rule interpreter in Java. The rules are written in xml files, every xml must be conform to an XML Schema (gdl.xsd). I'm using Netbeans 7.1.2 as IDE.When i check the xsd file and the xml files, Netbeans tell me that the are valid, but when i try to run my interpreter i get this error:javax.xml.bind.UnmarshalException - with linked exception:[org.xml.sax.SAXParseException; systemId: file:/C:/Users/Nimeta/Documents/NetBeansProjects/MAGENTA2/guidelines/spec/wcag20.xml; lineNumber: 2; columnNumber: 11; cvc-elt.1: cvc-elt.1: Cannot find the declaration of element "gdl_set".] My XSD file (gdl.xsd) starts with:\[code\]<xs:schema xmlns="http://mysite.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://mysite.org" elementFormDefault="qualified"><xs:element name="gdl_set"> <xs:complexType> <xs:sequence> <xs:element ref="name"/> <xs:element ref="guideline" maxOccurs="unbounded"/> </xs:sequence>\[/code\]My rule files start with:\[code\] <?xml version="1.0" encoding="UTF-8" standalone="yes"?><gdl_set xmlns="http://mysite.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mysite.org gdl.xsd" shortname="My short name"><name> My Name</name><guideline>\[/code\]Why I get this Error?
 
Back
Top