Overleg:CoinsCore:documentFragment Property

Uit COINS2
Ga naar: navigatie, zoeken

Deeplinking and the question should a hash-mark be used here

The idea behind the “documentFragment” property is to support so-called deep-linking.

A Coins object instance is capable to point directly to the relevant portion in a possibly large document in the container (or at an external web location). Normally deep-linking uses the hash mark (“#”) to separate the URI of the document itself and the local ID to identify this internal object. It is a universal technique, compare e.g. with an HTML link http://www.example.com/bar.html#foo to locate the element <a name=”foo” /> in the document “bar.html”. However, the fragment option is only defined in a web context, it has no meaning if the document is part of the container ZIP file itself, because there is no way to indicate such a document within the same ZIP file. Using the file:///... notation indicates to look for the document on the file system of the local machine where the COINS-application is running. To harmonize deep-link addressing COINS uses the fragment property for both internal and external document reference specifications. Because of this policy there is no need to use a hash-mark: we do not need an explicit delimiter because both parts “filePath” and “documentFragment” are separate properties now.

It is understandable that there can arise some confusing at this point because previous COINS 1.x version used only one address property for deep-link document references and needed therefor this delimiting hash-mark. As a consequence COINS implementations should silently ignore the presence of a hash-mark in property values.