Schema Error

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 1
Joined: Thu Aug 02, 2012 6:27 pm

Schema Error

Post by nlpalmquist » Thu Aug 02, 2012 7:19 pm

I can not seem to get the validation to like the XML/XSD documents

My XML starts:

<?xml version="1.0" encoding="UTF-8" ?>

My XSD starts:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs=""
elementFormDefault="qualified" >

I get an error that says:

Severity: warning
Description: SchemaLocation: schemaLocation value = 'Metrobill.xsd' must have even number of URI's.
Start location: 4:25
End location: 4:40

I can not figure out what the heck that means. It does not seem that any change I make removes this error.

When I display the .xsd file it shows the message:

Cannot find the declaration of element 'xs:schema' and highlights that in the document.

This could be two different issues but maybe it is the same problem. I would really appreciate any help. I tried have Oxygen generate a new Schema and it is still indicating the same error about the URI's but added an error about the target namespace of a attribute declaration must not match ''

Any help at all would be greatly appreciated. :(

Site Admin
Posts: 2102
Joined: Thu Jan 09, 2003 2:58 pm

Re: Schema Error

Post by george » Fri Aug 03, 2012 8:00 am


Your schema does not define a target namespace therefore you should use the xsi:noNamespaceSchemaLocation instead of xsi:schemaLocation to associate the schema with the document

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
If your schema defined a target namespace, let's say then you would have associated the schema with the document with something like

Code: Select all

  xsi:schemaLocation=" Metrobill.xsd"
that is adding the namespace to the schema location value.

oXygen provides an associate schema action that helps you by automatically inserting the right xsi: attribute and value to associate the selected schema.

George Cristian Bina

Post Reply