Config file

The configuration file is a file named emConfig.xml located in the /plugins/sk.uniba.euromath_x.x.x/ directory.

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://www.uniba.sk/euromath/config">

The header part.

  <locale>
    <language>en</language> <!-- lowercase two-letter ISO-639 code -->
    <!-- <country/> uppercase two-letter ISO-3166 code -->
  </locale>

Defines locales for EuroMath2. Optional language element defines language, and optional country element specifies the language more exactly by country where the language is spoken with.

  <local-cache>
    <!-- locally stored files, to speedup access -->
    <schema-root>schema</schema-root>
    <stylesheet-root>stylesheet</stylesheet-root>
    <!-- resolve given url to the following local url address. Currently the local URL is rooted in the schema-root -->
    <resolve url="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">org/w3/1998/Math/MathML/entities/mathml2.dtd</resolve>
    <resolve url="http://www.dcs.fmph.uniba.sk/euromath/document/2001/dtd/article.dtd">sk/uniba/euromath/document/2001/entities/article.dtd</resolve>
    <resolve url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">org/w3/1999/xhtml/xhtml1-strict.dtd</resolve>
    <resolve url="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">org/w3/2000/svg/svg10.dtd</resolve>
  </local-cache>

Defines locally stored schema, stylesheet and entity files. The schema-root element defines root URL where all schema and entity files are stored. This URL is relative to plugin's root directory (where the config file is stored). The URL should not contain spaces - replace them with %20.

The stylesheet-root defines root URL where all stylesheet files are stored.

The resolve element defines the local cache. An internet resource may be stored locally to prevent frequent internet access. Mostly DTD defining entities are defined here.

  <namespaces>

Defines all known namespaces. EuroMath2 won't accept XML with namespace not listed here.

    <namespace>
      <namespace-uri>http://www.w3.org/1998/Math/MathML</namespace-uri>
      <desc>Mathematical Markup Language (MathML) 2.0</desc>
      <default-prefix>mml</default-prefix>

Defines the MathML namespace. default-prefix specifies XML prefix most commonly used with this kind of document.

      <schema allow-other-ns="false">
        <location-url>org/w3/1998/Math/MathML/mathml2.xsd</location-url>
        <entities-url>http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</entities-url>
      </schema>

Defines the schema file. The element is optional but should be defined. allow-other-ns is used primarily with DTD schema - if true then elements and attributes from other namespaces are allowed to be inserted anywhere in the document.

location-url defines location of the schema file. If this URL is relative then it is rooted in the schema-root directory defined in the local-cache element. entities-url defines location of DTD defining entities.

      <stylesheet>
        <desc>Converts to MathML: Presentation Layer</desc>
        <target-uri>http://www.w3.org/1998/Math/MathML</target-uri>
        <location-url>org/w3/1998/Math/MathML/mmlctop2.xsl</location-url>
      </stylesheet>

Defines one stylesheet. target-uri element may occur multiple times - it must define all namespaces that this stylesheet is able to produce.

location-url defines location of the XSLT file. If the URL is relative then it is rooted in the stylesheet-root directory.

    </namespace>
    ...
  </namespaces>
</config>