[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: URIs harmful (was RE: Article: Keeping pa cewith
[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" />
|
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
|