W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Non-schema attributes

From: Alessandro Triglia <sandro@mclink.it>
Date: Mon, 24 Mar 2003 13:13:48 -0500
To: <xmlschema-dev@w3.org>
Message-ID: <000a01c2f231$1e079d50$8f01a8c0@Aldebaran>

Hi

I have a question about the use of non-schema attributes in schema
documents.

Since all schema element declarations contain an attribute wildcard with
a namespace constraint of ##other, I understand that:

- any attributes are allowed on these elements, besides the attributes
declared in the Schema for Schemas, provided that they don't belong to
the XML Schema namespace. In particular, *unqualified* attributes are
allowed.

Is this correct?   

If yes, I understand that the following schema document is valid:  

--------------------------------------------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns="http://www.example.com"
            targetNamespace="http://www.example.com">
  <xs:element name="elem1" age="42" type="Address"/>
  <xs:element name="elem2" type="xhtml:blockquote"/>
  <xs:attribute name="attr1"
      	  type="xsl:quantity"
	        targetNamespace="http://www.example.com"/>
</xs:schema>
--------------------------------------------------------------


Notice the attributes   "age"  on the first "element" element and
"targetNamespace"   on the "attribute" element.  Both of these
attributes are obviously meaningless, but are they actually forbidden?

Alessandro Triglia
OSS Nokalva
Received on Monday, 24 March 2003 13:21:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:36 GMT