[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Referencing attributes

From: Boris Kolpackov <boris@codesynthesis.com>
Date: Thu, 1 Mar 2007 18:28:29 +0200
To: xmlschema-dev@w3.org
Cc: Dwight Kelly <dkelly@yahoo.com>
Message-ID: <20070301162829.GA1698@karelia>
Referencing attributes
Hi,

Microsof's Print Schema[1] has a fragment that looks like so:


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <xs:complexType name="Type" mixed="true">
    <xs:attribute ref="xsi:type" use="required"/>
  </xs:complexType>

<xs:schema>


There is no import declaration for the xsi namespace. I am
wondering whether this is legal or not. I can see three
possible answers actually: (1) this schema is valid, (2) this
schema is invalid but can be made valid by importing a schema
that declares xsi:type:


<schema targetNamespace="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<attribute name="type" type="xs:QName"/>
<attribute name="nil" type="xs:boolean"/>

</schema>


And, finally, (3) referencing attributes from the xsi namespace
in the definition is illegal.


[1] http://www.microsoft.com/whdc/xps/printschema.mspx


thanks,
-boris


--
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding

Received on Thursday, 1 March 2007 16:42:19 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.