Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fragid, maintenance, typos, UML... #45

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
- uses: actions/checkout@v2
- name: Install packages
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install xsltproc fop xmlstarlet
sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz
sudo fc-cache -f
- name: Make XML, HTML and PDF
run: make html pdf
- name: Update Automatic Release
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
- uses: actions/checkout@v2
- name: Install packages
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install xsltproc fop xmlstarlet
sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz
sudo fc-cache -f
- name: Make XML, HTML and PDF
run: make html pdf
17 changes: 16 additions & 1 deletion dmlex-v1.0/specification/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,24 @@ dmlex-v1.0-wd01.fo: dmlex-v1.0-wd01.xml
dmlex-v1.0-wd01.html: dmlex-v1.0-wd01.xml
xsltproc --xinclude -o $@ stylesheets/oasis-specification-html.xsl $<

dmlex-v1.0-wd01.xml: dmlex.xml $(SOURCE_XML)
dmlex-v1.0-wd01.xml: dmlex.xml docbook/dbgenent.mod dmlex_uml.svg $(SOURCE_XML)
./merge.sh

dmlex_uml.pdf: dmlex.dot
dot -Tpdf < $< > $@

dmlex_uml.svg: dmlex.dot
dot -Tsvg < $< > $@

dmlex.dot: dmlex.dot.m4 dmlex.dot.content
m4 $< > $@

dmlex.dot.content: dmlex.nvh nvh2dot.py
awk '/<programlisting>/,/<\/programlisting>/' $< | tail -n+2 | head -n-1 | ./nvh2dot.py > $@

Makefile.dep: dmlex.xml $(SOURCE_XML) makedep.sh
echo -n "SOURCE_XML=" > $@
./makedep.sh >> $@

clean:
rm dmlex-v1.0-wd01.html dmlex-v1.0-wd01.pdf dmlex-v1.0-wd01.fo dmlex-v1.0-wd01.xml Makefile.dep dmlex_uml.svg dmlex_uml.pdf dmlex.dot dmlex.dot.content
Binary file removed dmlex-v1.0/specification/OASISLogo.jpg
Binary file not shown.
Binary file added dmlex-v1.0/specification/OASISLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dmlex-v1.0/specification/conformance/conformance.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
"../docbook/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
Expand Down
14 changes: 1 addition & 13 deletions dmlex-v1.0/specification/core/objectTypes/definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,9 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>definition</literal>
in the same <literal>lexicographicResource</literal>
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one). Non-empty string. A statement, in the same
<glossterm>required</glossterm> (exactly one) and <glossterm>UNIQUE</glossterm>. Non-empty string. A statement, in the same
language as the headword, that describes and/or explains the meaning of a sense. In DMLex,
the term definition encompasses not only formal definitions, but also less formal
explanations.</para>
Expand Down
25 changes: 4 additions & 21 deletions dmlex-v1.0/specification/core/objectTypes/entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,18 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). An unique identifier of the entry. Entries
which have identifiers are capable of being involved in relations created with the <olink
targetptr="linking">Linking module</olink>.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>entry</literal>
in the same <literal>lexicographicResource</literal>
(or in the same collection of lexicographic resources if cross-resource linking is required)
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para><literal>headword</literal>
<glossterm>required</glossterm> (exactly one). Non-empty string. The entry's
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm> (in combination with other unique properties if present). Non-empty string. The entry's
headword.</para>
</listitem>
<listitem>
<para><literal>homographNumber</literal>
<glossterm>optional</glossterm> (zero or one). The entry's homograph number, as a guide
to distinguish entries with the same headword.</para>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm> (in combination with other unique properties if present). The entry's homograph number, as a guide to distinguish entries with the same headword.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_partOfSpeech">partOfSpeech</olink></literal>
<glossterm>optional</glossterm> (zero or more). </para>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm> (in combination with other unique properties if present). </para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_label">label</olink></literal>
Expand Down Expand Up @@ -115,7 +99,7 @@
<example>
<title>XML</title>
<programlisting>
&lt;entry id="..." homographNumber="..."&gt;
&lt;entry homographNumber="..."&gt;
&lt;headword&gt;...&lt;/headword&gt;
&lt;partOfSpeech.../&gt;
&lt;label.../&gt;
Expand All @@ -130,7 +114,6 @@
<title>JSON</title>
<programlisting>
{
"id": "...",
"headword": "...",
"homographNumber": "...",
"partsOfSpeech": [...],
Expand Down
14 changes: 1 addition & 13 deletions dmlex-v1.0/specification/core/objectTypes/example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,9 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>example</literal>
in the same <literal>lexicographicResource</literal>
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one). Non-empty string. The example itself.</para>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. The example itself.</para>
</listitem>
<listitem>
<para><literal>sourceIdentity</literal>
Expand Down
18 changes: 3 additions & 15 deletions dmlex-v1.0/specification/core/objectTypes/inflectedForm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,9 @@
<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>inflectedForm</literal>
in the same <literal>lexicographicResource</literal>
can have the same <literal>id</literal>.
</para>
</formalpara>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. The text of the inflected
form.</para>
</listitem>
<listitem>
<para><literal>tag</literal>
Expand All @@ -45,11 +38,6 @@
inflection tags are allowed to occur in the lexicographic resource, and to map them onto
external inventories and ontologies.</para>
</listitem>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one). Non-empty string. The text of the inflected
form.</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_label">label</olink></literal>
<glossterm>optional</glossterm> (zero or more).</para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
<title>Comments</title>
<listitem>
<para>
<code>language</code> identifies the language of headwords, definitions and examples in this
<code>langCode</code> identifies the language of headwords, definitions and examples in this
dictionary. DMLex is based on the assumption that all headwords in a lexicographic resource
are in the same language, and that definitions and examples, if any are included in the
lexicographic resource, are in that language too. The <code>language</code> property of
lexicographic resource, are in that language too. The <code>langCode</code> property of
<code>lexicographicResource</code> informs potential users of the lexicographic resource
which language that is.</para>
</listitem>
Expand All @@ -60,11 +60,9 @@
for the existence of lexicographic resources which are not yet complete. </para>
</listitem>
<listitem>
<para>The <code>lexicographicResource</code> data type does not contain properties for
detailed metadata about the lexicographic resource, such as author, editor, publisher,
copyright status or publication year. Describing these properties of lexicographic resources
is outside the scope of DMLex. DMLex is a formalism for modelling the internal structure of
a lexicographic resource, not its metadata.</para>
<para>The <code>lexicographicResource</code> data type does not prescribe properties for
detailed metadata about the lexicographic resource, implementers are advised to refer to
the properties in the <link linkend="DublinCore">Dublin Core <code>elements</code> namespace</link> as for basic metadata. </para>
</listitem>
</itemizedlist>

Expand Down
16 changes: 2 additions & 14 deletions dmlex-v1.0/specification/core/objectTypes/pronunciation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,16 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>pronunciation</literal>
in the same <literal>lexicographicResource</literal>
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para>At least one of:</para>
<itemizedlist>
<listitem>
<para><literal>soundFile</literal>
<glossterm>optional</glossterm> (zero or one). A pointer to a file, such as a filename or a URI, containing a sound recording of the pronunciation</para>
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm>. A pointer to a file, such as a filename or a URI, containing a sound recording of the pronunciation</para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_transcription">transcription</olink></literal>
<glossterm>optional</glossterm> (zero or more).</para>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>.</para>
</listitem>
</itemizedlist>
</listitem>
Expand Down
22 changes: 3 additions & 19 deletions dmlex-v1.0/specification/core/objectTypes/sense.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,14 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier of the sense. Senses
which have identifiers can be involved in relations created with the <olink
targetptr="linking">Linking module</olink>.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>sense</literal>
in the same <literal>lexicographicResource</literal>
(or in the same collection of lexicographic resources if cross-resource linking is required)
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para><literal>listingOrder</literal>
<glossterm>required</glossterm> (exactly one). Number. The position of this sense among
other senses of the same entry. Can be implicit from the serialization.</para>
</listitem>
<listitem>
<para><literal>indicator</literal>
<glossterm>optional</glossterm> (zero or one). A short statement, in the same language as
<glossterm>optional</glossterm> (zero or one) and <glossterm>unique</glossterm>. A short statement, in the same language as
the headword, that gives an indication of the meaning of a sense and permits its
differentiation from other senses in the entry. Indicators are sometimes used in
dictionaries instead of or in addition to definitions.</para>
Expand All @@ -55,7 +40,7 @@
</listitem>
<listitem>
<para><literal><olink targetptr="core_definition">definition</olink></literal>
<glossterm>optional</glossterm> (zero or more). </para>
<glossterm>optional</glossterm> (zero or more) and <glossterm>unique</glossterm>. </para>
</listitem>
<listitem>
<para><literal><olink targetptr="core_example">example</olink></literal>
Expand All @@ -81,7 +66,7 @@
<example>
<title>XML</title>
<programlisting>
&lt;sense id="..."&gt;
&lt;sense&gt;
&lt;indicator&gt;...&lt;/indicator&gt;
&lt;label.../&gt;
&lt;definition.../&gt;
Expand All @@ -94,7 +79,6 @@
<title>JSON</title>
<programlisting>
{
"id": "...",
"indicator": "...",
"labels": [...],
"definitions": [...],
Expand Down
14 changes: 1 addition & 13 deletions dmlex-v1.0/specification/core/objectTypes/transcription.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,9 @@

<itemizedlist>
<title>Properties</title>
<listitem>
<para><literal>id</literal>
<glossterm>optional</glossterm> (zero or one). A unique identifier.</para>
<formalpara>
<title>Uniqueness constraint</title>
<para>
No two instances of <literal>transcription</literal>
in the same <literal>lexicographicResource</literal>
can have the same <literal>id</literal>.
</para>
</formalpara>
</listitem>
<listitem>
<para><literal>text</literal>
<glossterm>required</glossterm> (exactly one). Non-empty string. The actual
<glossterm>required</glossterm> (exactly one) and <glossterm>unique</glossterm>. Non-empty string. The actual
transcription.</para>
</listitem>
<listitem>
Expand Down
30 changes: 24 additions & 6 deletions dmlex-v1.0/specification/core/specification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,30 @@
<para><literal><olink targetptr="core_example">example</olink></literal></para>
</listitem>
</itemizedlist>
<para>
When exchanging data encoded in a DMLex serialization
which has the concept of a "root" or top-level object, such as XML and JSON,
then the object types <literal>lexicographicResource</literal> and <literal>entry</literal>
can serve as such roots.
</para>
<simplesect id="optionalroots">
<title>Optional roots</title>
<para>
When exchanging data encoded in a DMLex serialization
which has the concept of a "root" or top-level object, such as XML, JSON or NVH,
the object types <literal>lexicographicResource</literal> and <literal>entry</literal>
can serve as such roots.
</para>
</simplesect>
<simplesect id="fragid">
<title>Fragment identification</title>
<para>
Incomplete parts of DMLex objects represent valid fragments as long as it is possible to identify their complete source DMLex object.
For a particular serialization, this can be achieved by:
<itemizedlist>
<listitem>
<para>Making sure the fragment contains all <olink targetptr="uniqueids">unique properties</olink> of the DMLex parent-child hierarchy that are necessary to determine its source object.</para>
</listitem>
<listitem>
<para>Using a serialization-specific addressing mechanism (e.g. XPath for XML, JMESPath for JSON or an NVH query) to provide the location of the fragment in the source DMLex object.</para>
</listitem>
</itemizedlist>
</para>
</simplesect>
<xi:include href="objectTypes/lexicographicResource.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="objectTypes/entry.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<xi:include href="objectTypes/partOfSpeech.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
Expand Down
7 changes: 7 additions & 0 deletions dmlex-v1.0/specification/dmlex.dot.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
digraph dmlex {
rankdir="LR";
splines="ortho";
node[shape=record,style=filled,fillcolor=gray95]
edge[arrowhead=empty]
include(`dmlex.dot.content')
}
Loading
Loading