- https://elpa.gnu.org/packages/rnc-mode.html
- https://elpa.gnu.org – GNU Emacs Lisp Package Archive
Category: relax-ng
-
rnc-mode: Emacs mode to edit Relax-NG Compact files
-
XML Shell: xmlsh
- http://www.xmlsh.org
- https://github.com/xmlsh/xmlsh1_3
- they also provide a Java .jar file and a shell script etc around it, so you can run it on your platform
- http://www.xmlsh.org/CommandCsv2xml – builtin csv2xml, funny!
- http://www.xmlsh.org/CommandRngconvert – that’s trang, dealing with “Relax NG“
examples for csv2xml:
$ csv2xml -header my_file.csv
$ csv2xml -header -attr my_file.csv
# for CSV files created by Excel in Germany:
$ csv2xml -delim ‘;’ -header -attr my_file.csv
With -header the header line with its column names is being used to name the tags around the specific “cells” in XML.
If you prefer to use attributes for the column names, use -attr!
-
a car and a website – do they have anything in common?
Within the car I have in mind and I came across, its parts communicate using CANopen. The car’s software got mostly implemented in Ada, and once there existed a (home-brewn) software generator Ada code for CANopen message definitions. From the CANopen message definitions the generator created:
- data structures in Ada
- marshalling code
- de-marshalling code
There was still an ongoing development of the car, but because the generator got lost or abandoned, the software developers had to maintain and extend the generated code themselves. That’s a violation of a basic principle of course: Do not touch generated code! And it’s also quite a challenging task. They did a great job, but certainly they failed occasionally, and there are some cars out there with incorrect code.
I found the situation quite sad. And that triggered my creativity.
- I created a CANopen definition language in XML using RELAX-NG.
- I reconstructed the definitions of the CANopen messages used in the car.
- I developed a new generator.
- I created the code for the 1st car, compared it to the existing code step by step, … and finally the car still worked.
- I did so for all the cars’ software I found around. But unfortunately the cars themselves were not available on site.
Now for my current project: web development in HTML + Perl + JavaScript + CSS + “a home-brewn web-template-framework in Perl”. And where would be the similarity? The home-brewn web-template-framework got abandoned. Just the generated code is still in use and gets extended and maintained continuously. So new HTML does no longer get created through the framework but rather on the fly through JavaScript. That’s quite a funny and exciting way of writing HTML. And I am deeply impressed.
I am not sure, which framework would be the right thing to suggest for the next generation of this software.
-
nXML mode – James Clark’s page (i.e. the author’s)
nxml-mode works best with an RELAX-NG schema / grammar corresponding to the XML being edited.
- http://relaxng.org/
- http://www.thaiopensource.com/relaxng/trang.html
- is there a way to translate XSD to RNG?
- is there a way to translate Schematron to RNG?
- http://stackoverflow.com/questions/14803562/how-to-convert-an-xml-schema-xsd-to-relax-ng ???
- http://stackoverflow.com/questions/122089/xsd-to-rnc-or-rng-conversion-unix-command-line !!!
- http://www.xml.gr.jp/relax/
- http://debeissat.nicolas.free.fr/XSDtoRNG.php
- https://java.net/projects/msv
- http://search.maven.org/#browse%7C738029748 – msv
-
mind mapping using Free Mind and emacs and its nXML-mode
I got my quick introduction to Free Mind by son#1 (13yrs) today. Of course I am a stressful student. Of course he is not an advanced user. But we are doing well together.
We didn’t manage to get a cloud removed other then by undo. And of course you don’t want to make use of undo, if the doing happing an eternity ago.
As expected Free Mind’s file format is XML in its very own dialect.
So removing the cloud within the XML was an obvious option. Trang helped me to derive a RELAX-NG grammar from the example. The compact version of that grammar for use with nXML-mode is not perfect, but improving it doesn’t look difficult.
The first thing to do in emacs was obviously tidying the indentation. It was then, that the grammar showed, how imperfect it is. But easy to fix. And it was trival to remove the cloud.
-
editing XML documents in emacs using nxml-mode
One good reason for not not authoring in XML is not having a suitable editor or IDE. I personally use and recommend emacs and James Clark‘s nxml-mode. I create and modify all sorts of XML documents this way. If you supply nxml-mode with the right schema for your document, nxml-mode can even help you with tag completion and document validation. nxml-mode makes use of schemas in RELAX-NG, co-created by James Clark. RELAX-NG schemas are rather easily created, if not yet just available, as for DocBook, DocBook Website, DocBook Slides, and many, many other XMLs.
“Trang” is your tool for creating a RELAX-NG schema:- if you want to convert a DTD into a RELAX-NG schema,
- if you want to derive a RELAX-NG schema from a couple of XML files of a specific kind,
- …
I have done that a dozen times, it does work.
Here you find nxml-mode’s manual page.
Your mileage may vary … -
DocBook Website – where to get the Relax-NG schema from?
I found it at SourceForge.
I really love editing XML in Emacs’s nxml-mode. I did mention that at my DocBook Wiki home page already.