Hacker News new | ask | show | jobs
by gaxun 3395 days ago
There is no built-in detection of content changes in the standard, but it is designed to be potentially robust to changes.

It depends what type of specifier you use. The data model provides a number of specifier types. A "text position selector" would lock in the annotation at a certain point in the text like the 142nd character. An "xpath selector" would use a DOM-like notation to place the annotation.

If your annotation is a "highlight" then you would need to use these selectors within a "range selector" with a specified start and end point.

If you want your annotations to be robust to content changes, you will probably need to use multiple specifier types. This is allowed by the specification but it felt very clumsy to me to implement.

If the target is available at multiple URLs, there is something available to handle it, but the hosts of the content need to add links to the canonical URL so your annotation software can use that.