Difference between revisions of "XML editors"

From Apertium
Jump to navigation Jump to search
Line 8: Line 8:
* [[Emacs]] – a self-documenting, extensible lisp machine
* [[Emacs]] – a self-documenting, extensible lisp machine
** the built-in [[Emacs#nxml-mode|nxml-mode]] does validation
** the built-in [[Emacs#nxml-mode|nxml-mode]] does validation




==Converting DTD to XSD/RNC/RNG==
==Converting DTD to XSD/RNC/RNG==
An XML editor can check if you XML is well-formed (the brackets match up and so on), but to check for validity, you need to give it the schema for the file type you're editing. Some editors can read the DTD schemas in the lttoolbox/apertium directories, while some editors require other schema formats.
The java program "trang" can convert the dix and transfer dtd's to other formats like XSD, RNC or RNG, if your favourite editor doesn't support DTD's.

The java program "trang" can convert the dix and transfer DTD's to other formats like XSD, RNC or RNG, if your favourite editor doesn't support DTD's.


<pre>cd
<pre>cd
Line 21: Line 25:
java -jar trang.jar -I dtd -O rnc ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.dtd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.rnc
java -jar trang.jar -I dtd -O rnc ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.dtd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.rnc
</pre>
</pre>



==See also==
==See also==

Revision as of 07:41, 18 June 2014

Some XML editors used to edit Apertium language data (e.g. dix and transfer files):


Converting DTD to XSD/RNC/RNG

An XML editor can check if you XML is well-formed (the brackets match up and so on), but to check for validity, you need to give it the schema for the file type you're editing. Some editors can read the DTD schemas in the lttoolbox/apertium directories, while some editors require other schema formats.

The java program "trang" can convert the dix and transfer DTD's to other formats like XSD, RNC or RNG, if your favourite editor doesn't support DTD's.

cd
wget http://jing-trang.googlecode.com/files/trang-20091111.zip
unzip trang-20091111.zip
cd trang-20091111

java -jar trang.jar -I dtd -O xsd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.dtd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.xsd
java -jar trang.jar -I dtd -O rng ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.dtd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.rng
java -jar trang.jar -I dtd -O rnc ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.dtd ~/src/apertium/trunk/lttoolbox/lttoolbox/dix.rnc

See also