Skip to content

Commit 95a60ee

Browse files
authored
Merge pull request #400 from w3c/selector-fragement-uri-usage
Selector Fragment URI Usage in HTML Serialization Note
2 parents 59163c7 + 2aa4f6a commit 95a60ee

File tree

1 file changed

+61
-4
lines changed

1 file changed

+61
-4
lines changed

serialization-html-note/index-respec.html

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,20 @@
217217
publisher: "Spec-Ops",
218218
rawDate: "2016-04-26",
219219
status: "Unofficial Draft"
220-
}
220+
},
221+
"selectors-states": {
222+
"authors": [
223+
"Ivan Herman",
224+
"Robert Sanderson",
225+
"Paolo Ciccarese",
226+
"Benjamin Young"
227+
],
228+
title: "Selectors and States",
229+
href: "http://w3c.github.io/web-annotation/selectors/",
230+
publisher: "W3C",
231+
rawDate: "2017-01-20",
232+
status: "Reference Note"
233+
}
221234
},
222235
otherLinks: [
223236
{
@@ -389,7 +402,7 @@

Terminology

389402
section>
390403

391404
<section>
392-
<h3>Annotations Embedded in HTML as JSON-LDh3>
405+
<h3>Annotations Embedded as JSON-LDh3>
393406
<p>JSON-LD [[json-ld]] is the serialization format specified in the Web Annotation Data Model [[annotation-model]].
394407
HTML can accommodate this serialization format directly via the use of the HTML <code><script>code> element with its
395408
<code>typecode> attribute assigned the media type for a Web Annotation: <code>application/ld+json;profile="http://www.w3.org/ns/anno.jsonld"code>
@@ -484,7 +497,7 @@

Example

484497
section>
485498

486499
<section>
487-
<h3>Annotations Embedded in HTML as RDFah3>
500+
<h3>Annotations Embedded as RDFah3>
488501
<p>TODO: Describe how dokieli embeds Web Annotations in HTML using RDFa. Include examples of annotations in RDFa.
489502
Otherwise keep relatively succint and focused on the annotation in RDFa, with less about the complete application
490503
Instead point to the application...p>
@@ -522,7 +535,51 @@

Example

522535
</html>pre>
523536
section>
524537

525-
538+
<section>
539+
<h3>Web Annotation-based Citation URLsh3>
540+
<p>The Selectors and States Note [[selectors-states]] published by the Web Annotation Working Group includes information on encoding
541+
<a data-cite="selectors-states#frags">Web Annotation Selectors and State classes as IRI Fragmenet Identifiersa>. The following
542+
examples show how these URLs could be used to reference portions of a Specific Resource on the Web via IRIs:
543+
p>
544+
545+
<h4>Example using <blockquote> and <q> tagsh4>
546+
547+
<pre class="example highlight" title="Example blockquote and q tags using the cite attribute">
548+
<blockquote cite="https://www.w3.org/TR/annotation-model/">
549+
<q cite="https://www.w3.org/TR/annotation-model/#selector(type=TextPositionSelector,start=8424,end=8270)">
550+
An annotation is considered to be a set of connected resources, typically including
551+
a body and target, and conveys that the body is related to the target.</q>
552+
553+
<q cite="https://www.w3.org/TR/annotation-model/#selector(type=TextPositionSelector,start=8651,end=8576)">
554+
This perspective results in a basic model with three parts, depicted below.</q>
555+
556+
<!-- TODO: how do we make this an annotation? -->
557+
<img src="images/intro_model.png" alt="Basic Model: Annotation, Body and Target" width="400"/>
558+
</blockquote>
559+
pre>
560+
561+
<p>The Selectors and States Note [[selectors-states]] explains that fragment identifiers are technically defined when the media
562+
type is specified. However in practice the utilization of fragment identifiers by publishers and developers ranges from
563+
browser state handling to anchoring highlights of quotations (as seen here).p>
564+
565+
<p>Using these fragement identifiers as values of the <code>citecode> attribute on <code><blockquote>code>
566+
and <code><q>code> tags provides a means for both specificity and future extensibility. Site authors as well as
567+
browser, server, and JavaScript developers may take advantage of these citations identifiers for re-anchoring selection
568+
or extracting (and verifying) quotions made within an HTML document which uses this method.p>
569+
570+
<h4>Example using an <a> tagh4>
571+
572+
<p>Using the same methods described above, <code><a>code> tags may also be used to express a desired highlight or reference. However,
573+
as mentioned above, the use of that fragement within the retrieved resource may vary.p>
574+
575+
<pre class="example highlight" title="Example using an anchor tag">
576+
<p>According to the Web Annotation Data Model spec
577+
<a href="https://www.w3.org/TR/annotation-model/#selector(type=TextPositionSelector,start=8424,end=8270)">
578+
an annotation is considered to be a set of what things?</a>
579+
(click the link to find out!)</p>
580+
pre>
581+
section>
582+
526583
<section>
527584
<h3>Annotations Embedded in HTML as ??? - space for an additional approachh3>
528585
<p>TODO: Describe how Web Annotations can be embedded in HTML using an additional approach?p>

0 commit comments

Comments
 (0)