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

Re: Best Practice: id-idref or external entities?

  • From: daniela florescu <dflorescu@mac.com>
  • To: David Carlisle <d.p.carlisle@gmail.com>
  • Date: Thu, 08 Oct 2015 10:54:32 -0700

Re:  Best Practice: id-idref or external entities?
Entities, I have no opinions about. They get resolved before the XML Data Model (XDM) comes into the
picture for XQuery/XSLT processing.

The problem is with id/idrefs and their combination with XQuery/XSLT/Xpath set of specifications.

Examples:
1. nodes in XDM have an abstract unique identifier
2. this should NOT be confused with the @id attribute
3. the abstract identifier is unique across a universe that is NOT defined by the XDM, while the @id is unique on a document level
4. the abstract identifier is not serializable by default (it might in some implementations), while the @id obviously is
5. it is not clear to me how the @id/@idref non dangling pointers, aka @idrefs pointing nowwhere,
 is maintained through XQuery Updates (if at all) in case of general XML databases which do not consider “documents” a first class citizen.

Etc, etc, etc.

Id/idrefs and XDMs have been orthogonal in their design since the beginning, and it is better not to tempt the devil 
in this fragile area. 

It might become a source of nasty bugs, depending on the implementation.

Hope that helps,
Dana





> On Oct 8, 2015, at 7:34 AM, David Carlisle <d.p.carlisle@gmail.com> wrote:
> 
> On 8 October 2015 at 13:10, Daniela Florescu <dflorescu@mac.com> wrote:
>> My personal point of view would be very simple to express: avoid them if you can.
>> 
>> They mix very badly with XQuery and co.
>> 
>> Best regards
>> Dana
> 
> I'm not sure if you mean avoid entities here, or avoid id references?
> 
> Both have good and bad aspects with respect to XQuery/XSLT processing
> it seems to me.
> 
> We use entities (internal rather than external mostly, but that's not
> really relevant here) a lot precisely because they are transparent to
> the XSLT/Xquery processing.
> 
> To follow id/idrefs (or xlink or any custom link like xhtml href)
> requires more code at the XSLT level, although they typically help
> manage other properties such as uniqueness, so as usual, the answer
> depends on what you want to do....:-)
> 
> David



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.