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

Re: What are the characteristics of a good type system for XML


zref

?
is there any need to introduce the indirection through a prefix? wouldn't

 <zref idref="{some uri}a1"/>

be adequate? do you really need the benefit of the scoped bindings?

Rick Jelliffe wrote:
> 
> 
> IDs are one end of the non-tree structure in an XML document,
> a target for links.  So perhaps they don't have enough scope:
> perhaps documents should be given "keyscopes" which allows
> elements with IDs from one document to be pasted into another.
> Here is a mechanism, rather like the dreaded namespaces (no
> flames please), to demonstrate what I mean:
> 
> <x>
>     <y keyscope="some uri">
>         <z id="a1" />
>         <zref idref="a1"/>
>     </y>
>     <y keyscope="some other uri">
>         <z id="a1" />
>         <zref idref="a1"/>
>         <zref idref="aa:a1"  keyscope:aa="some uri"/>
>     </y>
> </x>
> 
> In other words, instead of (or as well as) the typing focus of
> what elements can be pointed by another element (i.e. the
> kinds of concerns that keys raise) perhaps we need to consider
> the modularity/document composition concern of how to
> allow cut and paste between documents without having to reallocate
> IDs.  So that IDs are universally unique.
> 
> What might a suitable keyscope URI be? Well, initially it can be
> the original document that the data was cut and pasted from.
> This brings us to a kind of transclusion: we keep track of the
> source of the fragment.

please don't do this. please just admit that id values are universal names and
serialize them as such.

> 
> <x>
>     <y keyscope=" http://www.eg.com/somedocument.xml ">
>         <z id="a1" />
>         <zref idref="a1"/>
>     </y>
>     <y>
>         <z id="a1" />
>         <zref idref="a1"/>
>         <zref idref="aa:a1"  keyscope:aa=" http://www.eg.com/somedocument.xml "/>
>     </y>
> </x>
> 
> where some smart software could figure out that there was some equivalence between
> <zref idref="aa:a1"  keyscope:aa=" http://www.eg.com/somedocument.xml "/>
> and
>  <zref xlink:href="http://www.eg.com/somedocument.xml#a1 "/>
>

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.