[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XMLSpy 4.4 and use of URN: (was RE: URIs harmful (was RE: [xml
Hi Tom. I tried to reproduce your results without success. Given your files below, both XMLSpy 4.4 and XSV 1.4 produce errors, and I think this is correct. Your instance document associates the prefix xlink with urn:www.w3.org/1999/xlink, yet your schema associates xink with http://www.w3.org/1999/xlink. The XMLSpy error message is saying that its looking for an href attribute in the http:... namespace but didn't find one, as the one in the instance is associated with urn:... XSV complains similarly, and also says that the attribute it did find is invalid. If I take your files and change all references to http://www.w3.org/1999/xlink in the schemas to urn:..., XMLSpy and XSV validate the instance file ok. I'm probably missing something obvious, or have I misunderstood your concern? Regards Michael > -----Original Message----- > From: Thomas B. Passin [mailto:tpassin@c...] > Sent: Wednesday, 24 July 2002 2:56 PM > To: xml-dev@l... > Subject: Re: URIs harmful (was RE: Article: Keeping > pa ce with James Clark) > > > [Michael Leditschke] > > > I've used URN:... in a schema namespace in XMLSpy since > > V3 without a problem. > > > > You just did not hit a winning combination. I just reconstructed the > circumstances. I saw the problem when Schema A, a no-namespace schema, > imports schema B, which does use a namespace. Changing the http:// > namespace to urn: causes the instance document to fail with Spy but still > succeed with xsv. Here are three files that illustrate. They validate OK > with both Spy 4.4 and xsv (downloaded today). Change all the xlink > namespaces to start with "urn:" instead of "http://". Now Spy fails to > validate while xsv still does. Spy says "Required attribute '???:href' of > element 'base' missing". > > As I see it, this is a fairly serious bug in a generally very > good product. > > Tom P > > Schema A: > > <xs:schema xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xs="http://www.w3.org/2001/XMLSchema"> > <xs:import namespace="http://www.w3.org/1999/xlink" > schemaLocation="xlink3.xsd"/> > <xs:element name="base" type="xlink:simpleHrefType"/> > </xs:schema> > > Schema B, the imported schema: > > <xs:schema targetNamespace="http://www.w3.org/1999/xlink" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > attributeFormDefault="qualified"> > <xs:complexType name="simpleHrefType"> > <xs:simpleContent> > <xs:extension base="xs:anySimpleType"> > <xs:attribute name="href" type="xs:anyURI" use="required"/> > </xs:extension> > </xs:simpleContent> > </xs:complexType> > </xs:schema> > > The instance document: > > <base xmlns:xlink="urn:www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation="base1.xsd" > xlink:href="zzz" /> > > > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> > >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|