[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


urn xml spy
[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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.