IDREF

Martin Bryan mtbryan at sgml.u-net.com
Mon Mar 23 11:54:46 GMT 1998


Peter Murray-Rust wrote:

>Since IDREF has potentially a strong overlap with XLL, I would like to know
>if they are two ways of doing the same things or whether they have distinct
>roles (so that it would be conceivable to have a document using both
>constructs). (Although XLL is not finalised I am assuming that it will be
>widely deployed within the nearish future :-).  Or is ID/IDREF primarily to
>ensure SGML compatibility until XLL gains ground?


They have distinct, if possibly overlapping, roles. ID/IDREF was designed to
handle internal links within a document: XLL is primarily designed to handle
links between one document and another. It so happens that you can use XLL
is a way that implies internal links, but this requires the use of the same
mechanisms that are used to handle external links.

There are fundamental differences, not least in terms of validation and
embedding. ID/IDREF comes with some inbuilt validation that you cannot get
with XLL. XLL comes with some inbuilt behaviours, which are not necessarily
appropriate for handling internal links. (For example, you would not
normally associate embedding with internal links.)

>IDREFS (sic) can have several targets. An HREF can have only one. This
>might make IDREFS considerably more concise.

XLL allows multiple locators in an extended link, but requires a separate
element rather than a separate attribute value token for each one.

>At present I neglect IDREFs because of the substantial additional effort in
>implementing what I see as a parallel system that may not be widely used.
>I'd be grateful to know if this is realistic.

You could decide that your application only supports XLL links, using Xptrs
without a source to specify them. Your application would not, though, be a
full XML application as it would not be able to create internal links from
any element with an IDREF attribute back to the element with the associated
ID attribute. (In general you only need to provide behaviour for IDREF->ID
traversal. Not many applciations allow you to find all the points where an
ID has been referenced.)

Is it really all that difficult to handle IDREF->ID links as simple links
(from the element with the attribute) which have the SHOW attribute set to
REPLACE and each IDREF token treated as if it were #token in XLL?

Martin Bryan


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list