| 1 | **<Stephanie+Olof>** [2013-04-25] |
| 2 | Question (TLA team): How are versions and fragments represented/encoded in "internal" identifiers and URIs in Wired-Marker? |
| 3 | |
| 4 | Answers: |
| 5 | |
| 6 | 1. Versioning: There is no real versioning system in Wired-Marker where versioning numbers (or the like) are stored. Instead, - and as long as Auto-caching is enabled in the settings dialogue - pages with markers (i.e. ~ 'annotations') are cached, i.e. saved as html + css files locally (OS X, default path: /Users/[user name]/Library/Application Support/Firefox/Profiles/[profile name]/WiredMarker/cache/. When using the 'Cache - Open cache' Wired-Marker function, users can thus get back to a physical 'snapshot' of the original state of the respective web page, which is a local copy though. These snapshots are established according to the URL + date + time range at the time of making an annotation on a specific web page. These data are used for creating a folder structure with a naming convention where among others date and time stamp information is included (example: ../WiredMarker/cache/2013/04/24/11/1a6beade73b701420ce943d404afd8ff/20130424111843). These are in turn checked against the the doc_url (example: [http://dasish.eu/dasishevents/]) and oid_date (example: 04/24/2013 11:18:43) fields of the marked (annotation) object in the local sqlite database, which makes the mapping between an annotated item and its locally cached parent web page version possible. |
| 7 | |
| 8 | 2. Fragments: As far as representation of fragments is concerned, Olof has pointed out earlier on that Wired-Marker uses the "hyperanchor" format. This format is a concept of an extended form of URL that includes additional information (position or range in a web page, modification style, etc.). Included is also a version number which refers to the hyperanchor format version (example: #hyperanchor1.3:). For putting together the hyperanchor format path, the XPath syntax is used. |
| 9 | |
| 10 | 'Real example' for 'hyper-anchor code' from Wired-Marker: |
| 11 | http://dasish.eu/dasishevents/#hyperanchor1.3%3A%2F%2Fdiv%5B%40id%3D%26quot%3Bwrapper-crumb-trail%26quot%3B%5D%2Ffollowing-sibling%3A%3Ap%5B1%5D(33)(3)(eve)%26%2F%2Fdiv%5B%40id%3D%26quot%3Bwrapper-crumb-trail%26quot%3B%5D%2Ffollowing-sibling%3A%3Ap%5B1%5D(71)(3)(ect) |
| 12 | |
| 13 | In URL decoded format: |
| 14 | http://dasish.eu/dasishevents/#hyperanchor1.3://div[@id="wrapper-crumb-trail"]/following-sibling::p[1](33)(3)(eve)&//div[@id="wrapper-crumb-trail"]/following-sibling::p[1](71)(3)(ect) |
| 15 | |
| 16 | We have implemented a transformation of this format to an xpointer: |
| 17 | http://dasish.eu/dasishevents/#xpointer(start-point(string-range(//div[@id=’wrapper-crumb-trail’/following-sibling::p[1]/text()[1],'',33)) /range-to(string-range(//div[@id=’wrapper-crumb-trail’]/following-sibling::p[1] /text()[1],'',77))) |
| 18 | This format can also be converted back to the hyperanchor format (if it uses a start-point and a range-to). |
| 19 | |
| 20 | The "hyperanchor" format has been developed by the same company that also was involved in developing the Wired-Marker Firefox add-on. The encoding is described in detail on their 'Technical Notes' web site: [http://www.hyper-anchor.org/en/technical.html], [http://www.hyper-anchor.org/en/technical_format.html], [http://www.hyper-anchor.org/en/technical_create.html], [http://www.hyper-anchor.org/en/technical_example.html]. |
| 21 | |
| 22 | The hyperanchor format also stores style information, like e.g. background-color, that is used to style the marked up string or node (= fragment). According to the mapping solution we now have in mind, this will be transferred to the annotation body (as inline CSS in XHTML format), like shown below: |
| 23 | |
| 24 | sample-annotation.xml |
| 25 | {{{ |
| 26 | <annotation ...> |
| 27 | ... |
| 28 | <body xmlns:xhtml="http://www.w3.org/1999/xhtml" type="Note" xml:lang="en"> |
| 29 | <xhtml:p style="background-color:#ff5555;">this is another annotation</xhtml:p> |
| 30 | </body> |
| 31 | ... |
| 32 | </annotation> |
| 33 | }}} |
| 34 | |
| 35 | |
| 36 | ---- |
| 37 | |