Closed kohlhase closed 9 years ago
how did you write the XML file? It looks like LaTeXML had created it, but I do not see a LaTeXML binding.
I thought I need to mimic what the the output of LaTeXML. I just changed it into a customized version.
I checked LaTeXML.rnc & LaTeXML-structure.rnc, which are in totally different form. Is this schema written by Hang OK?
I am impressed by your learning curve.
The schema is completelly OK, but not very maintainable (meaning people like Deyan, Bruce, and me are not used to reading them). It would be good if you could transform it into a form which introduces a macro for every element.
mockDoc.rng and mockDoc.rnc are completed. Namespace has also been added. Is it time to close this issue and move on to the next one now?
looks good except for a few things:
the namespace handling is wrong, the way you had it, you only had the top-level in the md namespace, you want
default namespace = "http:..."
in the schema and
<document xmlns="https:kwarc.info/projects/mockDoc">
in the XML file. That gives you all elements in in the right namespace (which is what you want).
Furthermore,
... foo ...
foo = element foo {...}*
is non-standard (and bad for reuse) , you want
... foo* ...
foo = element foo {...}
in the schema,
I have made the changes, so we can close now.
Make a RelaxNG schema for doc.cls. Read over http://www.relaxng.org/compact-tutorial-20030326.html and come up with a schema (called
doc.rnc
). It would probably be good to write an XML file (e.g.mockDoc.xml
) by hand that has the form you want to generate with LaTeXML and then use that to test your schema. I always useemacs
with nxml-mode to develop RelaxNG schemata (I can show you).