Dictionary XML Specification
Abstract
This document presents a specification for an XML-file format to be used in Glossword dictionaries. The purpose of this format is to provide a simple method to describe dictionary data that is being exchanged among software tools.
Status of this document
This is a working draft document and may be updated, replaced, or obsoleted by other documents at any time. Comments may be sent to team@glossword.biz.
Details
Elements
Structural Elements
<glossword>
Glossword dictionary - The <glossword> element encloses all the other elements of the document.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- <line>
<line>
One dictonary entry.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- One <term>, one or more <defn>.
Inline Elements
<term>
Dictionary term.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Text.
<defn>
Dictionary definition.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Zero, one or more <abbr>, <trns>, <see>, <syn>, <src>, <xref> elements, Text.
<abbr>
Abbreviation. CSS-driven area, which always shows before a definition.
- Required attributes:
- None
- Optional attributes
- lang
- Contents:
- Plain Text.
<trns>
Translation variant. CSS-driven area, which always shows before a Definition and after <abbr>.
- Required attributes:
- None
- Optional attributes
- lang
- Contents:
- Plain Text.
<see>
One term that is related to the current term.
- Required attributes:
- None
- Optional attributes
- link
- Contents:
- Plain Text.
<syn>
One synonym term for the current term.
- Required attributes:
- None
- Optional attributes
- link
- Contents:
- Plain Text.
<src>
The source of information for definition. Can be a name, HTML-code, E-mail address, etc.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Text.
<xref>
Link to another term, works within the current dictionary.
- Required attributes:
- link
- Optional attributes
- None
- Contents:
- Plain Text.
<usg>
Example phrase for a term usage. Zero, one or more.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Plain Text.
- <line>
- <term><![CDATA[block]]><term>
- <defn>
- <abbr lang="v.tr."><![CDATA[block on]]></abbr>
- <![CDATA[<p>To block, waiting for (something).</p>]]>
- <usg><![CDATA[Lunch is blocked on Phil's arrival.]]></usg>
- </defn>
- </line>
<trsp>
Phonetic transcription, the rule to pronounce. CSS-driven area with extended Unicode font, such as Arial Unicode MS, Lucida Sans Unicode. Appears before <trns> and <abbr>. Zero, one or more.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Plain Text.
- <line>
- <term><![CDATA[Assembler Language]]><term>
- <defn>
- <trsp><![CDATA[ə'sɛmblə 'læŋgwɪʤ]]></trsp>
- <![CDATA[<p>The lowest level programming language, where programmer sets direct instructions for processor in human readable format.</p>]]>
- <see link="Assembler"><![CDATA[Assembler]]></see>
- </defn>
- </line>
<stress>
Accent, emphasis. Makes a word accented.
- Required attributes:
- None
- Optional attributes
- None
- Contents:
- Plain Text.
- t<stress>e</stress>l<stress>e</stress>fone
- <stress>a</stress>ny <stress>w</stress><stress>o</stress><stress>r</stress><stress>d</stress>
rendered as:
- téléfone
- ány ẃóŕd́
Attributes
Optional and required attributes
lang
Attribute for an additional purpose. Language name, for example. Optional.
- Value description:
- Conditional name for language, abbreviation or anything else, that can be used to mark out a text. Examples:
- <abbr lang="v.tr."><![CDATA[to beat]]></abbr>
- <abbr lang="playing time"><![CDATA[00:32:01]]></abbr>
- <trns lang="Sw."><![CDATA[fabriker]]></trns>
renders as:
v.tr. to beat
playing time 00:32:01
Sw. fabriker
- Used in:
- <abbr>, <trns>
link
A hyper link. Optional.
- Value description:
- Common reference in the dictionary.
- <line>
- <term><![CDATA[NTSC Format]]><term>
- <defn>
- <![CDATA[A color television format having 525 scan lines (rows) of resolution at thirty frames per second (30 Hz). Found in American and Japanese DVD, VHS video, television and video games. 29.97 fps.]]>
- <see link="NTSC"><![CDATA[NTSC]]></see>
- <see link="PAL format"><![CDATA[PAL format]]></see>
- <see><![CDATA[<a href="http://">external link</a>]]></see>
- </defn>
- </line>
- <defn>
- ...which produces extensions like
- <xref link="tar.gz">.tar.gz</xref>,
- <xref link="tar.Z">.tar.z</xref>, and
- <xref link="tgz">.tgz</xref>.
- </defn>
- Used in:
- <see>, <syn>, <xref>
t1, t2, t3
Alphabetic order. Optional.
- Value description:
- Attribute value used to construct alphabetic order.
- <term t1="E" t2="X" t3="A"><![CDATA[Example]]></term>
Constructs navigation as follows:
E → EX → EXA → Example
- Used in:
- <term>
uri
Uniform Resource Identifier (URI). Optional.
- Value description:
- Attribute value used to construct links to term when SEO-mode is enabled.
- Used in:
- <term>
id
Term ID. Optional.
- Value description:
- Primary used for import. If a term with the same Term ID exists, it will be overwritten.
- Used in:
- <term>
Sample documents
Inuit-English dictionary
- <line>
- <term><![CDATA[pingasuyortok]]></term>
- <defn><![CDATA[]]>
- <abbr lang="Okk."><![CDATA[]]></abbr>
- <trns><![CDATA[six]]></trns>
- </defn>
- </line>
Example dictionary
- <line>
- <term t1="X" t2="M" t3="L" uri="xml-declaration" id="21"><![CDATA[XML declaration]]></term>
- <defn><![CDATA[Part of an XML document that defines the version of XML being used. Although the XML declaration looks like a processing instruction, it is not. For that reason, you cannot access the XML declaration from an XSLT stylesheet or an XPath expression.]]></defn>
- </line>
- <line>
- <term t1="S" t2="O" t3="U" uri="southing" id="23"><![CDATA[southing]]></term>
- <defn><![CDATA[]]>
- <abbr lang="048"><![CDATA[]]></abbr>
- <![CDATA[a southern movement.]]>
- </defn>
- <defn><![CDATA[]]>
- <abbr lang="144"><![CDATA[]]></abbr>
- <![CDATA[the distance travelled or measured southward.]]></defn>
- <defn><![CDATA[]]>
- <abbr lang="062"><![CDATA[]]></abbr>
- <![CDATA[the angular distance of a star etc. south of the celestial equator.]]>
- </defn>
- </line>
$Id: spec_xml.html,v 1.1.1.5 2003/05/08 04:23:00 tty Exp $