- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 12 Nov 2001 10:08:15 +0000
- To: "Steen Lehmann" <slehmann@silverstream.com>
- Cc: <xmlschema-dev@w3.org>, Tobias Ödell - SilverStream <todell@silverstream.com>
"Steen Lehmann" <slehmann@silverstream.com> writes: > 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. You and your validator are correct, the schema does not validate the examples. The UDDI people should be encouraged to change their examples (or their schema). ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-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/
Received on Monday, 12 November 2001 05:07:19 UTC