DDBC logo

Pop-up Annotation Service

Introduction

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 [攝摩騰]:

攝摩騰

Usage

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:

<html>
    <head>
        <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>
    </head>
    <body></body>
</html>

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"
"iba:ddbc:authPerson"
"iba:ddbc:authPlace"

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; }
title
(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.

title
(where class is "iba:ddbc:authDate")
s<datecode1><datecode2>
j<datecode1><datecode2>

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>
章帝建初元年
章帝建初元年