'Bare' identifiers
-
From HTML
HTML has always supported anchor-based references. The URI looks like
http://www.example.com/mydoc.htm#neato
, where 'neato
referred to <a name="neato">
. These identifers make it easy to point to specific locations, typically points within large documents. Although the a
element may contain other nodes, usual practice meant that the pointer really targeted the location of the start tag, which was frequently empty.
-
ID-type attributes provide hooks
If I have an element
<anchor id="neato" />
, I also need to have the id
attribute declared to be of type ID: <!ATTLIST anchor id ID #IMPLIED>
-
Referencing a hook
I can reference that element as
http://www.example.com/mydoc.xml#neato
.
-
IDs aren't always identified as such
In documents without DTDs or schemas, or applications which use non-validating parsers which don't process external DTDs or schemas, the XPointer processer may not be able to tell which attributes are really IDs. (You can always use the internal DTD subset, but that's a nuisance.) Some applications may guess that attributes named '
id
' are really IDs, but that may be a dangerous idea in the long run.
Previous Page <
TOC
> Next Page