Difference between revisions of "XML editors"
Jump to navigation
Jump to search
(man the state of FOSS XML editors sucks (unless you use emacs)) |
|||
Line 2: | Line 2: | ||
* [https://en.wikipedia.org/wiki/Gedit Gedit] – a GUI editor (written in C/Python) |
* [https://en.wikipedia.org/wiki/Gedit Gedit] – a GUI editor (written in C/Python) |
||
** syntax highlighting for XML out of the box, which does show some well-formedness errors |
** Does syntax highlighting for XML out of the box, which does show some well-formedness errors |
||
** https://launchpad.net/gedit-xmltools |
** There's an XML validation plugin at https://launchpad.net/gedit-xmltools but it only works with gedit2 |
||
* [http://xml-copy-editor.sourceforge.net/index.php?page=ubuntu XML Copy Editor] – a GUI editor (written in C++) purely meant for XML |
* [http://xml-copy-editor.sourceforge.net/index.php?page=ubuntu XML Copy Editor] – a GUI editor (written in C++) purely meant for XML |
||
** XML Copy Editor will check well-formedness (that you have your brackets and quotes in place) out of the box |
** XML Copy Editor will check well-formedness (that you have your brackets and quotes in place) out of the box |
Revision as of 09:27, 12 February 2015
Some XML editors used to edit Apertium language data (e.g. dix and transfer files):
- Gedit – a GUI editor (written in C/Python)
- Does syntax highlighting for XML out of the box, which does show some well-formedness errors
- There's an XML validation plugin at https://launchpad.net/gedit-xmltools but it only works with gedit2
- XML Copy Editor – a GUI editor (written in C++) purely meant for XML
- XML Copy Editor will check well-formedness (that you have your brackets and quotes in place) out of the box
- To get validation you may have to click XML→Associate→System DTD and select dix.dtd from lttoolbox (typically in /usr/local/share/lttoolbox or /usr/share/lttoolbox). This will insert a DOCTYPE line in your xml, but that's fine.
- There seems to be a bug that gives wrong line numbers on some validation errors.
- Jedit – a GUI editor (written in Java)
- http://stackoverflow.com/a/3435092/69663 lists some handy XML plugins
- Vim – a lightweight, modal editor
- Emacs – a self-documenting, extensible lisp machine
- The built-in nxml-mode does well-formedness checking
- See Emacs#Validation_quickstart for how to make Emacs use the DTD's for validation
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
- Easy dictionary maintenance – GUI for editing dictionaries
- Dixtools: Enhance – interactive tool to add new words to a dictionary (asks you for a word that inflects the same, finds the paradigm for you)