OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] URIs harmful (was RE: [xml-dev] Article: Keeping pa cewith

[ Lists Home | Date Index | Thread Index ]

[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" />







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS