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

RE: Problems using XML Schema validated input document with X


movie xml schema
I do not believe that is correct.  Attributes, unless specifically
qualified, belong to no namespace, even the default.
An attribute can appear in a different namespace than the element that
contains it. For example, <movie:title xml:lang="fr"> has an attribute that
is not from the movie namespace. If an attribute name has a prefix, its name
is in the namespace indicated by the prefix. However, if an attribute name
has no prefix, it has no namespace. This is true even when the default
namespace has been assigned. The W3C Namespaces in XML Recommendation makes
that point with this example:
[PARA]<x xmlns="http://www.w3.org" xmlns:n1="http://www.w3.org">[PARA]
<good a="1" n1:a="2" />[PARA]</x>
From http://www-106.ibm.com/developerworks/library/x-nmspace.html 


-----Original Message-----
From: Chiusano Joseph [mailto:chiusano_joseph@b...]
Sent: Friday, November 08, 2002 11:42 AM
To: list@a...; xml-dev@l...
Subject: Re:  Problems using XML Schema validated input document
with Xerces

Adam,

Without seeing the pertinent portion of your schema it's difficult to
definitively say what the problem may be...however, I'd be happy to
offer a tip. 

Unless attributes are namespace-qualified, they belong to the same
namespace as the element with which they are associated.  That is, an
attribute will never be included in a default namespace, even if its
associated element belongs to the default namespace of the schema.  The
fact that you noted that "the namespace seems to be wrong" indicates
that you might want to verify that your expectation of what the
namespace should be is correct.

Hope that helps,
Joe Chiusano
Booz | Allen | Hamilton

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.