blob: facccece5e7709c31d34cb86a40dfc374dbad184 [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
<!doctype html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Apache Annotator (incubating) demo</title>
<link rel="stylesheet" href="">
blockquote {
font-style: italic;
a[href^="#selector"]:before {
content: '📌';
font-size: 75%;
mark {
background-color: rgba(255, 255, 0, 0.5);
outline: 0.1px solid rgba(255, 100, 0, 0.8);
#parsed {
height: 15rem;
overflow: scroll;
<h1>Selector Demonstration</h1>
<p>This page demonstrates
<p>Linking to this page with a selector fragment causes the matching text to
be highlighted in the following paragraphs:
<blockquote id="corpus">
<p>Hello, annotated world!
<p>To annotate, or not to annotate, that is the question.
<p>Try some examples:
<a href="#selector(type=RangeSelector,startSelector=selector(type=TextQuoteSelector,exact=ann),endSelector=selector(type=TextQuoteSelector,exact=!))">RangeSelector</a>
(<a href="" target="_blank">spec</a>)
<a href="#selector(type=TextQuoteSelector,exact=annotated%20world,refinedBy=selector(type=TextQuoteSelector,exact=tat))">Refining
a selector using another selector</a>
(<a href="" target="blank">spec</a>)
<li><a href="#selector(type=TextQuoteSelector,exact=not)">Multiple matches</a> (but overlapping matches currently mess up the highlighter)
<li><a href="#selector(type=TextQuoteSelector,exact=To%20annotate%2C%20or%20not%20to%20annotate%2C,refinedBy=selector(type=RangeSelector,startSelector=selector(type=TextQuoteSelector,exact=To%20annotate,refinedBy=selector(type=TextQuoteSelector,exact=annotate)),endSelector=selector(type=TextQuoteSelector,exact=not%20to%20annotate,refinedBy=selector(type=TextQuoteSelector,exact=%20to)),refinedBy=selector(type=TextQuoteSelector,exact=o)))">Any deeper nesting of the above</a>
<p>Below, the same paragraphs are presented again. Selecting some of the text
creates a
that matches the selection <em>unambiguously</em> within the context of
the paragraphs.
<blockquote id="selectable">
<p>Hello, annotated world!
<p>To annotate, or not to annotate, that is the question.
<p>Here is the selector in JSON format:
<pre><code id="parsed"></code></pre>
<script src="/demo.js"></script>