DDBC logo

Pop-up Annotation Service


The Pop-up Annotation Service is one of the core DDBC Authority Web Services. It provides web applications with a small embedded pop-up box which displays content retrieved from the DDBC Authority Database.

Below is an example of the Pop-up Annotation Service in action. Clicking on the text below will display a pop-up box containing the DDBC Authority Database information pertaining to the name given [攝摩騰]:



In order to use the Pop-up Annotation Service, the following two steps are required.

Step 1: embed the JavaScript file at http://authority.dila.edu.tw/webwidget/popup.js into the html page (this can be either a static html file or a page dynamically generated from a web application). For example:

        <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
        <title>Authority Test</title>
        <script type="text/javascript" src="http://authority.dila.edu.tw/webwidget/popup.js"></script>

Step 2: Mark up time, person and place entities in the html page with DDBC Authority Tag Set. See examples below.

DDBC Authority Tag Set

The DDBC Authority Tag Set has been created based on the standard (x)html <span> tag and standard (w3c valid) attributes, for which a set of DDBC Authority values are specified.

The basic format of a DDBC Authority Tag is:

<span class="EntityClassName" title="id"></span>
Attribute Value(s) Description
class "iba:ddbc:authDate"

The type of the authority entity

Note: if you wish to style <span> elements using this class, you can do so provided you escape the colons (':') in the class name. e.g.

.iba\:ddbc\:authPerson { color: #f00; }
(where class is "iba:ddbc:authPerson" or "iba:ddbc:authPlace")
<AuthorityId> | <String>

The authority id of the entity

http://authority.dila.edu.tw provides the web query interface for looking-up Authority IDs

Alternatively, you may specify a string which will be used as a query term, in which case all possible matches (which may be none) will be returned.

(where class is "iba:ddbc:authDate")

For a Date Authority Entity query, id is an concatenation of two datecodes that represents the beginning and the end of the time period.

  • "s" indicates that the datecode is in the date format ±YYYY-mm-dd
  • "j" indicates that the datecode is in Julian Day Number format

The formula to covert DDBC Authority Time IDs (d) to Julian Day Numbers (j) is: j=d-3511565

Examples of DDBC Authority Tag Set usage:

Type Example(s) Click Me!
Person entity
<span class="iba:ddbc:authPerson" title="A001583">鳩摩羅什</span>
<span class="iba:ddbc:authPerson" title="安公">安公</span> (search)
Place entity
<span class="iba:ddbc:authPlace" title="CN0620982Z54AA">燉煌郡</span>
Date entity
<span class="iba:ddbc:authDate" title="s+0076-02-24+0077-02-11">章帝建初元年</span>
<span class="iba:ddbc:authDate" title="j17488711749224">章帝建初元年</span>