- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 25 Mar 2003 08:38:06 +0000
- To: "Alessandro Triglia" <sandro@mclink.it>
- Cc: <xmlschema-dev@w3.org>
"Alessandro Triglia" <sandro@mclink.it> writes:
> 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?
No. ##other means "qualified with a namespace other than the target
namespace."
> 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?
Yes, they're forbidden.
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Tuesday, 25 March 2003 03:38:09 UTC