attributeFormDefault and UDDI v.1 documents

Hi everybody,

I'm developing a W3C XML Schema validator and am more than a little
confused about the implications of attributeFormDefault=qualified on
documents with only a default namespace, such as many UDDI documents I
use for testing.

In the official UDDI v.1 schema (from www.uddi.org),
attributeFormDefault has the value qualified. According to my
understanding of the Schema standard, this requires attributes in
instance documents to be explicitly declared to be in a namespace. As I
understand the namespace standard, declaring a default namespace on a
document does not put the attributes in that namespace (however, they
are somehow "associated" with it).

My problem is the fact that the sample documents I can find on the web
(from IBM, Microsoft) only have a default namespace declared on them,
and my validator dutifully reports that none of the required attributes
are present, since they are not in the target namespace of the uddi
schema. Is this being too strict, or are the documents in error? See
sample below:

UDDI schema fragment (version 1):

<?xml version="1.0" encoding="UTF-8" ?> 
<xsd:schema id="uddi" attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="urn:uddi-org:api"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:uddi="urn:uddi-org:api">
  <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> 
[...]
  <xsd:element name="find_tModel" type="uddi:FindTModel" /> 
  <xsd:complexType name="FindTModel">
    <xsd:sequence>
      <xsd:element minOccurs="0" maxOccurs="1" name="findQualifiers"
type="uddi:FindQualifiers" /> 
      <xsd:element minOccurs="0" maxOccurs="1" name="name"
type="xsd:string" /> 
      <xsd:element minOccurs="0" maxOccurs="1" name="identifierBag"
type="uddi:IdentifierBag" /> 
      <xsd:element minOccurs="0" maxOccurs="1" name="categoryBag"
type="uddi:CategoryBag" /> 
    </xsd:sequence>
    <xsd:attribute name="generic" type="xsd:string" use="required" /> 
    <xsd:attribute name="maxRows" type="xsd:int" use="optional" /> 
  </xsd:complexType>
[...]
</xsd:schema>

Sample UDDI XML document (from IBM):

<?xml version="1.0"?>
<find_tModel generic="1.0" xmlns="urn:uddi-org:api">
  <categoryBag>
    <keyedReference
tModelKey="UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4"
                    keyName="uddi-org:types" keyValue="wsdlSpec"/>
  </categoryBag>
</find_tModel>

My validator expects the attributes to have a namespace prefix mapped to
the UDDI namespace URI. Any help is much appreciated.

Cheers,

Steen Lehmann
slehmann@silverstream.com
Senior Software Engineer (R&D)
SilverStream Software

Received on Sunday, 11 November 2001 14:28:54 UTC