Skip to content

Commit

Permalink
CDGroups (#61)
Browse files Browse the repository at this point in the history
* adding the cdgroup attribute to OMOBJ

* copying over and adapting OMOBJ/@cdbase description from MathML3

* oops, typo

* diff markup

* change tabulation

* clarifying the default of CDGroupURL

* typo

* adding uniqueness constraint for CDNames in CD groups

* adding CDGroupInclude

* specifying an inclusion mechanism for CD groups

* clarifying CDName vs. CDURL to allow aliasing for the MathML3 translation.

* better change tabulation

* allowing to use CDGroupInclude
  • Loading branch information
kohlhase authored and davidcarlisle committed Oct 7, 2017
1 parent 918159f commit 8bd96c9
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 23 deletions.
5 changes: 3 additions & 2 deletions omcdgroup2.rnc
Expand Up @@ -8,14 +8,15 @@ default namespace = "http://www.openmath.org/OpenMathCDG"
CDGroupName = element CDGroupName { xsd:NCName }
CDGroupVersion = element CDGroupVersion { xsd:nonNegativeInteger }
CDGroupRevision = element CDGroupRevision { xsd:nonNegativeInteger }
CDGroupURL = element CDGroupURL { text }
CDGroupURL = element CDGroupURL { xsd:anyURI }
CDGroupDescription = element CDGroupDescription { text }
# info on the CDs in the group
CDComment = element CDComment { text }
CDGroupMember =
element CDGroupMember {
CDComment?, CDName, CDVersion?, CDURL?
}
CDGroupInclude = element CDGroupInclude { xsd:anyURI }
CDName = element CDName { xsd:NCName }
CDVersion = element CDVersion { xsd:nonNegativeInteger }
CDURL = element CDURL { text }
Expand All @@ -27,7 +28,7 @@ CDGroup =
CDGroupRevision?,
CDGroupURL,
CDGroupDescription,
(CDGroupMember | CDComment)*
(CDGroupMember | CDComment | CDGroupInclude)*
}
start = CDGroup

89 changes: 69 additions & 20 deletions omstd20.xml
Expand Up @@ -1042,14 +1042,18 @@ the <phrase>&exml; Encoding</phrase></title>

<para>An encoded &OM; object is placed inside an <systemitem>OMOBJ</systemitem> element. This
element can contain the elements (and integers) described above.
<phrase> It can take an optional
It can take an optional
<systemitem>version</systemitem> (&exml;) attribute which indicates to
which version of the &OM; standard it conforms. In previous versions of
this standard this attribute did not exist, so any &OM; object without
such an attribute must conform to version 1 (or equivalently 1.1) of the
&OM; standard. Objects which conform to the description given in this
document should have <systemitem>version="2.0"</systemitem>.
</phrase></para>
<phrase revisionflag="added">The <systemitem>OMOBJ</systemitem> element can also take an optional
<systemitem>cdgroup</systemitem> attribute, which specifies a CD group file that acts as a
catalogue of CD bases for locating OpenMath content dictionaries of
<systemitem>OMS</systemitem> elements in this <systemitem>OMOBJ</systemitem> element. When no <systemitem>cdgroup</systemitem> attribute is explicitly specified, the document format embedding this <systemitem>OMOBJ</systemitem> element may provide a method for determining CD bases. Otherwise the system must determine a CD base; in the absence of specific information <ulink url="http://www.openmath.org/cd">http://www.openmath.org/cd</ulink> is assumed as the CD base for all <systemitem>OMS</systemitem> elements.</phrase>
</para>

<para>We briefly discuss the &exml; encoding for each type of &OM; object
starting from the basic objects.</para>
Expand Down Expand Up @@ -3983,16 +3987,19 @@ name="plus"/></systemitem>: <literallayout><![CDATA[



<para>The CD
Group mechanism is a convenience mechanism for identifying collections
of CDs. A CD Group file is an &exml; document used in the (static or
dynamic) negotiation phase where communicating applications declare
and agree on the Content Dictionaries which they process. It is a
complement, or an alternative, to the individual declaration of
Content Dictionaries understood by an application. Note that CD
Groups do <emphasis>not</emphasis> affect the &OM; objects themselves.
Symbols in an object always refer to content dictionaries, not
groups.</para>


<para>
The CD Group mechanism is a convenience mechanism for identifying collections of CDs
<phrase revisionflag="added">and specifying their location by an URI</phrase>. A CD
Group file is an &exml; document used in the (static or dynamic) negotiation phase where
communicating applications declare and agree on the Content Dictionaries which they
process. It is a complement, or an alternative, to the individual declaration of
Content Dictionaries understood by an application. <phrase
revisionflag="added">Additionally, a CD Group file can also be used as a catalog for
defaulting the CD bases of &OM; symbols.</phrase> Note that CD Groups do
<emphasis>not</emphasis> affect the &OM; objects themselves. Symbols in an object
always refer to content dictionaries, not groups.</para>

<para>For an application to declare that
it <quote>understands CDGroup G</quote> is exactly equivalent to, and
Expand Down Expand Up @@ -4074,7 +4081,9 @@ version numbers of the CDGroup.
<varlistentry><term><systemitem>CDGroupURL</systemitem></term>
<listitem><para>The text occurring in the <systemitem>CDGroupURL</systemitem>
element identifies the location of the CDGroup file, not necessarily
of the member Content Dictionaries. For the syntactical
of the member Content Dictionaries. <phrase revisionflag="added">If the
<systemitem>CDGroupURL</systemitem> element is missing, it defaults to the URL of
the current CD group file.</phrase> For the syntactical
requirements, see <systemitem>CDURL</systemitem> in <xref linkend="sect_pcdata"/>.</para>

</listitem>
Expand All @@ -4092,12 +4101,31 @@ mathematical area of the CDGroup.</para>

</listitem>
</varlistentry>
<varlistentry><term><systemitem>CDName</systemitem></term><listitem><para>The
text occurring in the <systemitem>CDName</systemitem> element
corresponds to the name of a Content Dictionary in the CDGroup. For
the syntactical requirements, see <systemitem>CDName</systemitem> in
<xref linkend="sect_pcdata"/>.</para>

<varlistentry><term><systemitem>CDGroupInclude</systemitem></term>
<listitem><para revisionflag="added">The text content of the
<systemitem>CDGroupInclude</systemitem> identifies an external CD group file whose CDGroup
members are to be included into the current one. Technically: the set of CDs of CD group
given by a CD group file with <systemitem>CDGroupInclude</systemitem> elements is
determined by recursive flattening: The cd group has all the CDs given directly by the
<systemitem>CDGroupMember</systemitem> elements together with those CDs from CD groups
referenced in the <systemitem>CDGroupInclude</systemitem> elements. If this leads to
duplicate <systemitem>CDName</systemitem>s, then directly specified CDs are prioritized,
for duplications between referenced CD groups, the latter one is prioritized.
For the syntactical
requirements, see <systemitem>CDURL</systemitem> in <xref
linkend="sect_pcdata"/>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem>CDName</systemitem></term>
<listitem>
<para><phrase revisionflag="changed">The text occurring in the
<systemitem>CDName</systemitem> element names the referenced Content Dictionary (see
<systemitem>CDURL</systemitem> below) in this CD group,</phrase> <phrase
revisionflag="added">it must be unique in the CD group. In particular,
<systemitem>OMS</systemitem> elements in an <systemitem>OMOBJ</systemitem> whose
<systemitem>cdgroup</systemitem> attribute references the current CD group derive their CD base
via this <systemitem>CDName</systemitem>.</phrase> For the syntactical requirements, see
<systemitem>CDName</systemitem> in <xref linkend="sect_pcdata"/>.</para>
</listitem>
</varlistentry>
<varlistentry><term><systemitem>CDVersion</systemitem></term><listitem><para>The
Expand Down Expand Up @@ -4843,9 +4871,30 @@ details of how this attribute is used are not mandated by the standard.
<xref linkend="sec_xml-desc"/>.
</para>
</listitem>
<listitem>
<para revisionflag="added">
For a better alignment with MathML3, the <systemitem>OMOBJ</systemitem> element
has been extended by a <systemitem>cdgroup</systemitem> attribute that specifies
a CDGroup file hat acts as a catalog for the CD bases of
<systemitem>OMS</systemitem> elements in that <systemitem>OMOBJ</systemitem>.
</para>
</listitem>
<listitem>
<para revisionflag="added">
The meaning of <systemitem>CDGroup/CDGroupMember/CDName</systemitem> has been
clarified in terms of uniqueness conditions and correspondence to name of the
referenced CD.
</para>
</listitem>
<listitem>
<para revisionflag="added">
An inclusion mechanism has been introduced to make the
<systemitem>cdgroup</systemitem> catalog mechanism in MathML more realistic and
manageable.
</para>
</listitem>
</itemizedlist>
</section>


</appendix>

Expand Down
2 changes: 1 addition & 1 deletion openmath2.rnc
@@ -1,14 +1,14 @@
# RELAX NG Schema for OpenMath 2
# Revision 2: Corrected regex for OMI to match the documented standard and allow hex


default namespace om = "http://www.openmath.org/OpenMath"

start = OMOBJ

# OpenMath object constructor
OMOBJ = element OMOBJ { compound.attributes,
attribute version { xsd:string }?,
attribute cdgroup { xsd:anyURI}?,
omel }


Expand Down

0 comments on commit 8bd96c9

Please sign in to comment.