![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - What is wrong with this .XSD? [Thread Next] Re: What is wrong with this .XSD?To: NULL Date: 3/2/2005 1:48:00 PM Casper B wrote: > I have trouble constructing an .xsd to validate the following simple XML: > > ------ > <?xml version = "1.0" encoding="UTF-8"?> > <FormatSpec FormatName="Test" Encoding="ISO-8859-1" TableName="RecordSet" > xmlns="http://www.xyz.com" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="FormatSpec.xsd"> schemaLocation takes at list of white space separated namespaceURIs and schema URIs e.g. xsi:schemaLocation="http://www.xyz.com FormatSpec.xsd" > <RowSpec Iterations="1"> > <ColSpec BeginOffset="0" EndOffset="8" RegExMatch="udgstart"/> > </RowSpec> > > <RowSpec RowName="Record"> > <ColSpec BeginOffset="0" EndOffset="12" ColName="BuildingId"/> > <ColSpec BeginOffset="17" EndOffset="21" ColName="StartDateYear"/> > <ColSpec BeginOffset="55" EndOffset="80" Trim="true" ColName="Name"/> > </RowSpec> > </FormatSpec> > ------ > > My parser (oracle v2 for Java) only seems to validate the top element > and never any attributtes even though I (think) I specify this with the > following .xsd schema: > > ------ > <?xml version="1.0" encoding="windows-1252" ?> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns="http://www.xyz.com" > targetNamespace="http://www.xyz.com" > elementFormDefault="qualified" > attributeFormDefault="qualified"> Your attributes above are all unqualified (in no namespace) so here you should use attributeFormDefault="unqualified" -- Martin Honnen http://JavaScript.FAQTs.com/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
