• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

xml validation against xsd schema

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am new in web technologies.
Please, help!
I've created xsd file, using Visual Studio to do validation for xml data
xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"

xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="stations">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="station-entry">
<xs:complexType>
<xs:sequence>
<xs:element name="station-id" type="xs:unsignedByte" />
<xs:sequence>
<xs:element name="entry" type="xs:string" />
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

xsd file has beed created by Visual Studio, using the xml:
<?xml version="1.0" encoding="utf-8" ?>
<stations>
<station-entry>
<station-id>1</station-id>
<entry>"1 AST"</entry>
<entry>"7 ART"</entry>
</station-entry>
<station-entry>
<station-id>2</station-id>
<entry>"1 AMR Plt"</entry>
<entry>"2 ASR"</entry>
</station-entry>
</stations>

Validation return error:

../data/please.xsd:2: element schema: Schemas validity error : Element '{http://www.w3.org/2001/XMLSchema}schema': No matching global declaration available for the validation root.


Any idea what is wrong with xsd? xml?

Thanks,
Angela.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Angela,

I searched for your error message and found XML Schema error 1845 No matching global declaration available for the validation root.

Regards,
Dan
 
reply
    Bookmark Topic Watch Topic
  • New Topic