Difference between revisions of "JEdit"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
 (those point-and-click editors)  | 
				|||
| Line 1: | Line 1: | ||
'''jEdit''' is a FOSS programmer's editor with a good XML plugin that does validation. It's written in Java, and runs on Windows, Mac OS X and Linux.  | 
  '''jEdit''' is a FOSS programmer's editor with a good XML plugin that does validation. It's written in Java, and runs on Windows, Mac OS X and Linux.  | 
||
==Set up validation==  | 
|||
To set up full validation of Apertium .dix dictionary files:  | 
  To set up full validation of Apertium .dix dictionary files:  | 
||
# install jEdit (<code>sudo apt-get install jedit</code> on Ubuntu)  | 
  # install jEdit (<code>sudo apt-get install jedit</code> on Ubuntu)  | 
||
| Line 10: | Line 11: | ||
# for Output path, select some folder in your home directory and type "dix.rng"; click OK  | 
  # for Output path, select some folder in your home directory and type "dix.rng"; click OK  | 
||
==Validate and error check a dix file==  | 
|||
Now, to get error-checking and validation in a dix file that you've opened, just click Plugins→XML→Set Schema, and open the "dix.rng" file you created in the previous step.   | 
  Now, to get error-checking and validation in a dix file that you've opened, just click Plugins→XML→Set Schema, and open the "dix.rng" file you created in the previous step.   | 
||
: It should be possible to set the schema automatically each time you open a dix file, how does one do this?  | 
|||
Clicking Plugins→Sidekick→Sidekick and the Parse button will give you an updated "tree view" of your XML file.   | 
|||
Clicking Plugins→ErrorList→Error List will show you a list of XML validation errors.  | 
|||
[[Category: Writing dictionaries]]  | 
  [[Category: Writing dictionaries]]  | 
||
Revision as of 12:09, 23 August 2012
jEdit is a FOSS programmer's editor with a good XML plugin that does validation. It's written in Java, and runs on Windows, Mac OS X and Linux.
Set up validation
To set up full validation of Apertium .dix dictionary files:
- install jEdit (
sudo apt-get install jediton Ubuntu) - start jedit and click Plugins→Plugin Manager, click the Install tab, wait for the list to fill up, and tick XML and click Install
 - click Plugins→XML→Translate Schema using Trang
 - for Input path, choose the file "dix.dtd" in the folder trunk/apertium/apertium/ (it might also be in /usr/local/share/apertium/ if you installed apertium to the standard path, or you could get it from http://apertium.svn.sourceforge.net/viewvc/apertium/trunk/apertium/apertium/dix.dtd)
 - for Input type, select DTD
 - for Output type, select RNG
 - for Output path, select some folder in your home directory and type "dix.rng"; click OK
 
Validate and error check a dix file
Now, to get error-checking and validation in a dix file that you've opened, just click Plugins→XML→Set Schema, and open the "dix.rng" file you created in the previous step.
- It should be possible to set the schema automatically each time you open a dix file, how does one do this?
 
Clicking Plugins→Sidekick→Sidekick and the Parse button will give you an updated "tree view" of your XML file.
Clicking Plugins→ErrorList→Error List will show you a list of XML validation errors.