bluedot.net

May 3, 2004

Your Own ID Attributes as Link Destinations

Filed under:Markup — sps @ 8:56 pm

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 or schema, the recently updated xml:id proposal, and rdf:ID attributes. I recently discovered that when you send Mozilla or IE to an XML document that points to a stylesheet transforming it to HTML, and that transformation adds unique ID values to the HTML versions of the elements, a fragment identifier of a particular element’s ID added to the URL sends the browser right to that element. You can base these ID values on attribute (or element!) values from your original data, which means that any values that you use to assign identity to elements can turn those elements into Mozilla or IE linking destinations. Mozilla and IE no longer require a name attribute on a elements to let you link to a point within those web pages, because an id attribute on any HTML element can now turn it into a link destination.

read the full article

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Blue Dot
  • StumbleUpon
  • Technorati
  • Reddit
  • YahooMyWeb
end

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.