Your Own ID Attributes as Link Destinations

03 May 2004

The XML world has debated the best way to assign identity to elements.Choices include attributes declared as being of type ID in a DTD orschema, the recently updated xml:id proposal, and rdf:ID attributes. Irecently discovered that when you send Mozilla or IE to an XML documentthat points to a stylesheet transforming it to HTML, and thattransformation adds unique ID values to the HTML versions of the elements,a fragment identifier of a particular element’s ID added to the URLsends the browser right to that element. You can base these ID valueson attribute (or element!) values from your original data, which meansthat any values that you use to assign identity to elements can turnthose elements into Mozilla or IE linking destinations. Mozilla and IEno longer require a name attribute on a elements to let you link to apoint within those web pages, because an id attribute on any HTMLelement can now turn it into a link destination. read the full article