[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Schema Instance why does xmlns attribute causes problem?

From: Joseph Pecoraro <joepeck02@gmail.com>
Date: Thu, 13 Nov 2008 12:28:32 -0500
Message-Id: <75DF9B69-9E4E-4CE6-8611-A7BC46835996@gmail.com>
To: xmlschema-dev@w3.org
Schema Instance why does xmlns attribute causes problem?
Hello,

I have a quick question.  I'm trying to validate an XML document using
a Schema and I ran into an issue.  I can't tell, based on the  
specification
why what I have appears invalid.

I have the following:

<test test_id="1"
     xmlns="http://people.rit.edu/~jjp1820/770/project/xtml_test"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://people.rit.edu/~jjp1820/770/project/xtml_test
                         http://people.rit.edu/~jjp1820/770/project/xtml_test.xsd 
">

Which appears invalid in the tool that I'm using.

But, Once I remove the plain xmlns attribute and get the following
which appears valid:

<test test_id="1"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://people.rit.edu/~jjp1820/770/project/xtml_test
                         http://people.rit.edu/~jjp1820/770/project/xtml_test.xsd 
">

I would like to know why the top, previous example is "invalid."  To me,
it means the exact same thing, but its slightly redundant.  I will  
certainly
use the bottom from now on, but I would be interested in knowing
how, why, or even if the top syntax is invalid.

Thanks guys,
Joseph Pecoraro
Received on Thursday, 13 November 2008 18:30:53 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.