XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Paul GardnerSubject: 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" />

<xsd:element name="transactions" type="transactionsType"/>

<xsd:complexType name="transactionsType">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="assetAdjustment" />
<xsd:element ref="d6sNotDueIn" />
</xsd:choice>
</xsd:complexType>

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 name="transactions">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="d6sNotDueIn"/>
</xs:sequence>
</xs:complexType>
</xs:element>

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.

TIA
Paul

Postnext
Tony LavinioSubject: Having trouble with schema validation
Author: Tony Lavinio
Date: 10 Jan 2007 09:03 AM
You may zip the files together and send them to
stylus-field-report (at) progress.com, and we will
take a look at them for you.

Postnext
Paul GardnerSubject: Having trouble with schema validation
Author: Paul Gardner
Date: 10 Jan 2007 09:12 AM
Files sent.

Thanks,
Paul

Postnext
Alberto MassariSubject: Having trouble with schema validation
Author: Alberto Massari
Date: 10 Jan 2007 09:35 AM
Hi Paul,
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.

Hope this helps,
Alberto

Posttop
Paul GardnerSubject: Having trouble with schema validation
Author: Paul Gardner
Date: 10 Jan 2007 09:42 AM
Gee, that's kinda basic, isn't it?

Works now.

Thanks,
Paul

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.