Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Schema Instance why does xmlns attribute causes problem?

From: Joseph Pecoraro <joepeck02@-----.--->
To: xmlschema-dev@--.---
Date: 11/13/2008 6:33:00 PM
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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent