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

Identity-constraints, attributes and lax/skip wildcards

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Tue, 26 Apr 2005 19:36:00 +0200
To: XML-SCHEMA <xmlschema-dev@w3.org>
Message-Id: <1114536960.1619.28.camel@librax>
xerces xpath xsd selector bug

Hi,

how to handle the following scenario?

- an attribute was validated against a "skip" wildcard
- OR an attribute was validated against a "lax" wildcard and no
  corresponding declaration was existent
- an IDC field evaluated to such an attribute

Validation rule "Identity-constraint Satisfied" says:

"3 For each node in the ·target node set· all of the {fields}, with that
node as the context node, evaluate to either an empty node-set or a
node-set with exactly one member, which must have a simple type"

Should such an attribute have a simple type? Should we fall back
to "anySimpleType" here - similar to elements, where we fall back to
"anyType" if the wildcard was "lax"?

Example:

Schema:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="foo">
    <xsd:complexType>
      <xsd:anyAttribute namespace="##any" processContents="skip"/>
    </xsd:complexType>
    <xsd:key name="aKey">
      <xsd:selector xpath="."/>
      <xsd:field xpath="@bars"/>
    </xsd:key>
  </xsd:element>
</xsd:schema> 

Instance:
<foo bar="abc"/>

XSV 2.8 reports:

"missing one or more fields [<XSV.util.xpath.XPath instance at
0x0131A120>] from key {None}aKey

while Xerces-J 2.6.2 and MSXML 4.0 both eat it.

Regards,

Kasimier 
Received on Tuesday, 26 April 2005 17:36:07 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.