Subject:Having trouble with schema validation Author:Paul Gardner Date:10 Jan 2007 08:49 AM
The validator seems to be having trouble with one of my schemas. What I've got is the following:
XML schema is broken into three files. First file (and the one I've associated to the XML document I'm attempting to validate) contains this:
<!-- include the transaction schema documents -->
<xsd:include schemaLocation="assetadjustment.xsd" />
<xsd:include schemaLocation="d6s.xsd" />
The other two files contain the assestAdjustment and d6sNotDueIn schemas respectively.
The problem I'm having is that the validator isn't recognizing the root node "transactions". I tried creating a schema from the XML file, and it created something like this:
<xs:element maxOccurs="unbounded" ref="d6sNotDueIn"/>
So the name is there and can be recognized. Any ideas? Is the schema just too complex? I'm using 2007 Professional. I can't post the related files here, but can send this directly if someone is ever assigned to this issue. I've tried all the validation options on the menu, and either they didn't work, or they all returned the same problem.
Subject:Having trouble with schema validation Author:(Deleted User) Date:10 Jan 2007 09:35 AM
the error is the namespace used in the XML file; in fact the schema defines the 'transactions' element in the target namespace "https://pbuse.us.army.mil/xsd" while your XML document places it in the empty namespace.
You must add a xmlns="https://pbuse.us.army.mil/xsd" attribute to the root element of your XML document.