Re: [gedit-list] gtksourceview syntax checker or DTD etc?



Il giorno gio, 01/11/2007 alle 21.17 +1100, John Pye ha scritto:
> Hi there
> 
> I have a project that bundles a .lang file that allows users to edit
> some bespoke text files using gedit with syntax highlighting. Recently
> with the release of gedit in Ubuntu 7.10, I noticed that gedit now uses
> gtksourceview-2.0, and the syntax for .lang files have changed quite a bit.
> 

Yes, http://library.gnome.org/devel/gtksourceview-2.0/stable/ has a file
format reference.
Note that gtksourceview 2 is still able to load the old lang files,
though porting is a good idea since it allows to take advantage of the
new features

> I wonder if anyone can suggest any XML validators that could be used to
> check the syntax of the .lang file I am working on, perhaps with the
> addition of a DTD or XSD (iirc) file? Or perhaps there's a debug mode in
> gedit that will give me some output about problems with .lang files?
> 

In the directory where language files shipped with gtksourceview are
installed you'll find both a .dtd for the 1.0 format and a .rng
(RelaxNG) file for the 2.0 format.
Note that gtksourceview 2 does the relaxng validation itslef when
loading a file.
In the gtksourceview source package there is also a tiny script called
convert.sh/convert.py to convert old lang files in new ones: it is not
perfect but it can give you a start to improve on.


ciao

	Paolo

> Cheers
> JP
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]