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
Jonathan JenkinsSubject: Problem trying to use your software to validate XML and schema
Author: Jonathan Jenkins
Date: 20 Jan 2009 01:44 AM
Good morning,

Below are the error messages I receive while using yoru software to vbalidate the attached XML document. As I only have one reference to an XSD I am unsure why your software is having a problem validating my XML document. Can you help step me thru thus process with yoru software?

Thanks!

Jonathan

Validating signup_political.xml...
file:///d:/Corps Strategies/signup_political.xml:3,148: schema document 'file:///d:/Corps%20Strategies/signup_political.xsd' has different target namespace from the one specified in instance document ''
file:///d:/Corps Strategies/signup_political.xml:3,148: no declaration found for element 'contacts'

The XML document signup_political.xml is NOT valid (2 errors)


Unknownsignup_political.xml
XML doc

Unknownsignup_political.xsd
Schema

Posttop
Minollo I.Subject: Problem trying to use your software to validate XML and schema
Author: Minollo I.
Date: 20 Jan 2009 02:08 PM
I can see several problems:

- The XML Schema you have attached has a wrong XML PI:
<?xml version="1.0" encoding="UTF-8"??>
You should fix that into:
<?xml version="1.0" encoding="UTF-8"?>

- The XML document declares xsi:noNamespaceSchemaLocation; but the referenced XML Schema specifies a targetNamespace; so, the XML document should associate the referenced XML Schema to that specific namespace:
<contacts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com signup_political.xsd">

- The XML Schema defines the "contact" element; but not the "contacts" element; so, validation will complain that "contacts" is not defined

- <contact> should use the target namespace of the schema; so, maybe you can change it to <contact xmlns="http://www.w3schools.com">

- The schema defines a number of sub-elements for <contact>; but your XML document uses attributes (that are not defined as part of the schema)

 
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.