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

attributeGroups and anyAttribute

From: Kriegesmann, Peter <Peter.Kriegesmann@softwareag.com>
Date: Mon, 14 Apr 2003 12:37:27 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106071F9F7B@daemsg02.software-ag.de>
To: "Schema Dev XML (E-mail)" <xmlschema-dev@w3.org>

Dear friends of the XML schema,

I have another question regarding xs:anyAttribute.
Take a look at the schema below:

<xs:schema targetNamespace = "http://target" xmlns:t = "http://target"
xmlns:tsd = "http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition"
xmlns:xs = "http://www.w3.org/2001/XMLSchema">
  <xs:attributeGroup name = "ag1">
    <xs:attributeGroup ref = "t:ag2"></xs:attributeGroup>
    <xs:anyAttribute namespace = "http://myNameSpace" processContents =
  <xs:attributeGroup name = "ag2">
    <xs:anyAttribute namespace = "##targetNamespace"></xs:anyAttribute>
  <xs:element name = "E">
        <xs:extension base = "xs:string">
          <xs:attributeGroup ref = "t:ag1"></xs:attributeGroup>

Is it really valid ?
Various schema validators, such as IBM SQC, Xerces claim that it is.

But how can a validator determine, which anyAttribute definition to use for
element E ?
Remember that the content model for ..xs:simpleContent/xs:extension is

(annotation?, ((attribute | attributeGroup)*, anyAttribute?))

So several anyAttribute definitions are not allowed, there should be no
difference when attributeGroups are used.

In this case there are 2 contrary definitions:

1. <xs:anyAttribute namespace = "http://myNameSpace" processContents =
2. <xs:anyAttribute namespace = "##targetNamespace"></xs:anyAttribute>

It is possible to merge namespace declarations:

<xs:anyAttribute namespace = "http://myNameSpace ##targetNamespace"/>

But what to do with processContents "skip" vs. "strict" ??

Your help is appreciated,
Best regards,

Peter Kriegesmann
Phone	 06151-921484
Electronic Business Technologies (QE)				Fax
Software AG
Uhlandstrasse 12				  
D-64297 Darmstadt
Received on Monday, 14 April 2003 06:37:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:01 UTC