slatex / LaTeXML-Plugin-sTeX

A LaTeXML Plugin for Semantic LaTeX (sTeX)
LaTeX Project Public License v1.3c
2 stars 3 forks source link

spurious omtext in frames #114

Closed kohlhase closed 6 years ago

kohlhase commented 7 years ago

When I generate OMDoc from e.g. in AI/source/propositional-reasoning/en/BNI-enum-principle.tex we get an OMDoc file from LaTeXML,

<omdoc xmlns:omdoc="http://omdoc.org/ns" xmlns="http://omdoc.org/ns" xmlns:stex="http://kwarc.info/ns/sTeX" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:om="http://www.openmath.org/OpenMath" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:base="https://mathhub.info" xml:id="omdoc1" about="#omdoc1" stex:srcref="MiKoMH/AI/source/probabilistic-reasoning/en/BNI-enum-principle.tex#textrange(from=4;0,to=0;0)">
  <omdoc:omgroup layout="slide" xml:id="omdoc1.omgroup1" about="#omdoc1.omgroup1" stex:srcref="MiKoMH/AI/source/probabilistic-reasoning/en/BNI-enum-principle.tex#textrange(from=1;0,to=34;11)">
    <omdoc:metadata....
    </omdoc:metadata>
    <omdoc:omtext xml:id="omdoc1.omgroup1.omtext2" about="#omdoc1.omgroup1.omtext2" stex:srcref="MiKoMH/AI/source/probabilistic-reasoning/en/BNI-enum-principle.tex#textrange(from=3;0,to=3;84)">
      <omdoc:uses from="MiKoMH/AI/source/probabilistic-reasoning/en/BN-inference-task#BN-inference-task"/>
      <omdoc:uses from="smglom/arithmetics/source/sum#sum"/>
      <omdoc:CMP xml:id="omdoc1.omgroup1.omtext2.CMP1" about="#omdoc1.omgroup1.omtext2.CMP1" stex:srcref="MiKoMH/AI/source/probabilistic-reasoning/en/BNI-enum-principle.tex#textrange(from=5;0,to=33;15)">
<ul xmlns="http://www.w3.org/1999/xhtml" id="I1" class="ltx_itemize">
<li id="I1.i1" class="ltx_item" style="list-style-type:none;"><span class=" ltx_tag_itemize">&#x2022;</span> 
<div id="I1.i1.p1" class="ltx_para">
<p id="I1.i1.p1.p1" class="ltx_p" about="#I1.i1.p1.p1">&lt;1-&gt;</p>
</div><omdoc:omtext xml:id="I1.i1.omtext2" about="#I1.i1.omtext2"
...

which is ill-formed. The problem is that we get an <omdoc:omtext> after the <omdoc:metadata>, which should not be there. This is probably auto-generated because the <omdoc:uses> element is not allowed in <omdoc:omgoup>. Need to fix that and test.

cc: @tkw1536

kohlhase commented 6 years ago

Indeed, the schema needed an extension, now I only need to be able to generate the model (see #115)