OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: XML-LINK and IDREF

[ Lists Home | Date Index | Thread Index ]
  • From: Peter@ursus.demon.co.uk (Peter Murray-Rust)
  • To: xml-dev@ic.ac.uk
  • Date: Mon, 02 Jun 1997 12:58:28 GMT

In message <0Zm96CAybpkzEwi6@light.demon.co.uk> Richard Light writes:
> While we're on the subject of linking, I'm intrigued about the status of
> the IDREF attribute type in XML.

Agreed.  I had thought about this as well.  It's not easy to see how
both might be used fruitfully at the same time without confusion.

Formally, my understanding of ID/IDREF is that it is part of XML-LANG and
must be supported by XML-LANG processors ([50] Validity checks).  The IDREF
can only point to an ID in the same document (at least how I read it).  
Therefore one option is for implementers not to use XML-LINK and to use 
ID/IDREF for whatever purposes they wish (structural, annotation, and
with whatever behaviour.)  Although I'm not an SGML expert I imagine this
is frequently done already.

The advantage/characteristic of ID/IDREF is that checking is at syntactic
level (i.e. parsers are required to analyse it).  [I am not sure what
status ID/IDREF has in WF documents, as it will only know which the IDs are
if there is an ATTLIST, i.e. a DTD or DTD fragment is included].

> 
> In the SGML world, simple links within a document are mostly done with
> IDREF -> ID, e.g.:

It is part of the language.  In XML-LINK we are introducing another part
of the 'language.'

> <div1 id="chap.beginnings"><head>New Beginnings</head>
> <p> ...
> ...
> <p>As we saw earlier in <ref target="chap.beginnings">Chapter 5</ref>,
> ...
> 
> (where the TARGET attribute has type IDREFS).  Browsers such as Panorama
> recognise and support these links natively.

'Support' is presumably application-dependent.  Presumably browsers have
something like:  ACTUATE="USER" SHOW="REPLACE" as default - if an IDREF is 
discovered it is announced to the user who can navigate from there.

> 
> Is the intention in XML that IDREF(S) attributes are only supported "for
> compatibility", and that the XML simple link should be used instead,
> i.e.:
> 
> ...
> <p>As we saw earlier in <ref HREF="#chap.beginnings">Chapter 5</ref>,
> ...

XML-LINK can also point outside the document.

> 
> (where REF is now defined as having attribute XML-LINK="simple") ?

The implementer and author is obviously given more help and guidance for
implementing links with XML-LINK sinec there are a number of attributes
which will be well documented and where usage will develop.  [There would
be nothing to stop DTD authors including ROLE, ACTUATE, SHOW with IDREF
but it would not be likely to be standard practice, whilst the usage
of these with HREF presumably will have a good communality of purpose and
implementation.].

> This obviously has implications for XML processors.

Yes!  The full XML-LINK spec is rather daunting for an implementer.  In
principle it could require writing something part of the way towards Hyper-G
or HyTime.  *How* far is what concerns me at present :-)  So my present approach
is to:
	- ignore ID/IDREF for my own DTDs
	- enable JUMBO to locate IDs.  [Note this is not trivial, because
		not all parsers provide this information at present.]
	- not provide special support in JUMBO [the application programmer can
		find the IDREFs and build their own stuff if 
		required.]
	- fully implement XML-LINK=SIMPLE (hopefully more or less on track at
		present.)
	- think furiously about EXTENDED.  From what Eliot has written, I 
		suspect it will be a lazy implementation - i.e. storing links
		as they are 'discovered' in documents and adding this 
		information to nodes.  It will be Web-like and unlikely to be 
		a complete linkset unless it becomes very clear how these are 
		created and used.


	P.

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS