ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
Re: Identity-constraint
by Eddie Robertsson other posts by this author
Mar 5 2001 10:34PM messages near this date
Identity-constraint | Re: Identity-constraint
"Henry S. Thompson" wrote:

>  Correct analysis.  Schema _slightly_ buggy -- remember XPath does not
>  utilise the default namespace declaration.

Ah, thank you. That was an important piece of information I've completely missed
out on.

Cheers,
/Eddie

>  > <?xml version="1.0" encoding="UTF-8"?>
>  > <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
>  > elementFormDefault="qualified" targetNamespace="www.allette.com.au/keyref"
>  > xmlns="www.allette.com.au/keyref">
> 
>    xmlns="www.allette.com.au/keyref" xmlns:r="www.allette.com.au/keyref">
> 
>  >  <xsd:element name="Project">
>  >   <xsd:complexType>
>  >    <xsd:sequence>
>  >     <xsd:element ref="Item1" minOccurs="0"/>
>  >     <xsd:element ref="Item2" minOccurs="0"/>
>  >    </xsd:sequence>
>  >   </xsd:complexType>
>  >   <xsd:key name="Item1Key">
>  >    <xsd:selector xpath="Item1"/>
> 
>       <xsd:selector xpath="r:Item1"/>
> 
>  >    <xsd:field xpath="@Item1_2"/>
>  >   </xsd:key>
>  >   <xsd:keyref name="Item2_KeyRef" refer="Item1Key">
>  >    <xsd:selector xpath ="Item2"/>
> 
>       <xsd:selector xpath ="r:Item2"/>
> 
>  >    <xsd:field xpath ="@Item2_2"/>
>  >   </xsd:keyref>
>  >  </xsd:element>
> 
>  With these changes this validates the example and catches errors if
>  you add them.
> 
>  ht
>  --
>    Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
>            W3C Fellow 1999--2001, part-time member of W3C Team
>       2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
>              Fax: (44) 131 650-4587, e-mail: ht@[...].uk
>                       URL: http://www.ltg.ed.ac.uk/~ht/
Thread:
Faroukh Fekravar
Eddie Robertsson
Eddie Robertsson
Faroukh Fekravar

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved