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

Requirement for attributes with schema scope

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@i...'" <xml-dev@i...>, "'www-xml-schema-comments@w...'" <www-xml-schema-comments@w...>
  • Date: Thu, 6 Jan 2000 14:59:20 -0700

requirement attributes
Section 2.5 of Structures says:

Attributes and local element declarations are special, in that every type defines its own attribute symbol space and local element symbol space, which are distinct from each other. In addition,
top-level elements (whose declarations are not contained within a type definition) reside in their own symbol space.  And the Schema for Schema only allows attribute declarations to appear within the
scope of a type or attributeGroup.

However, you can use the <anyAttribute> element to say that an element in this namespace can have any attribute from an alien namespace.  However, without being able to have an attribute with schema
scope, how do you know which declaration of a given attribute should be used for validation.  For example,

Schema for ThisNamespace:

<schema xmlns="http://www.w3.org/1999/XMLSchema"

	<element name="someElement">

Schema for ThatNamespace:

<schema xmlns="http://www.w3.org/1999/XMLSchema"

	<element name="coffee">
		<attribute name="temp">
				<enumeration value="Hot"/>
				<enumeration value="Tepid"/>

	<element name="employee">
		<!--  is this employee a temporary  -->
		<attribute name="temp" type="boolean"/>

Sample Document:

<!--  that:temp is ambiguous, 
	should it be the employee status or the coffee temperature -->
<someElement xmlns="http://www.software.aeat.com/ThisNamespace"


Attribute declarations need to be able to appear in the scope of a <schema> element.  To allow reuse, <attribute> should also have a ref attribute so that global scoped attributes can appear in a
element without a duplicate definition.  Only attributes with a schema scope should be used to resolve namespace qualified attributes.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.
First Name
Last Name
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.