Re: [gedit-list] Documentation plugin feature request



Hi Jim,

To test if the XML plugin is working, just make an XML file with invalid XML (ie - mismatched tags) and see if an error pops up. If not, you may have built it wrong.

In terms of validating against a schema, I think code assistance does not look at file extensions. It determines file type by checking the "highlight mode" which you can set manually if gedit does not auto detect the type.

The location of the schema is relative to the location of the file you have opened. So if they are in the same directory you should not need to reference any directories at all, just the schema file name. An absolute path should work too.

-Jono


On Fri, Oct 19, 2012 at 12:32 PM, Jim Campbell <jwcampbell gmail com> wrote:
Hi Jono,


On Fri, Oct 12, 2012 at 2:38 PM, Jono <jono foodnotblogs com> wrote:
Hey All,

Realized I never mentioned on this thread...
I added support for XML in the code-assistance plugin. It can also validate your document against an XML Schema Document or a RelaxNG file.

Jesse has merged it into the main repo on git.gnome.org

Feel free to tell me if you have any problems with it.


I've compiled the plugin with the XML backend included (I believe I used the --include-xmlbackend=yes option, or something similar when running the 'configure' portion of the build process . . . I'm not at my home PC now, though, so it might be something a little different). 

I can also see the plugin in my list of plugins, and it appears to activate just fine. One question that I have with regards to the plugin, though, concerns how to link the schema to the document that I'm working on.

I see that I'm supposed to include a comment at the top of the file that specifies the RelaxNG schema that I'm using, but I'm not sure how the plugin picks up on this schema . . . do I need to specify the full path to the schema in the comment? Does the .rng schema file need to be placed in a certain directory to be picked-up by the plugin? 

When I tried using it last night, it didn't seem to work, but I'm not sure if I didn't activate the plugin correctly, or if I made some other kind of error. Are there any keyboard shortcuts that I should be using to make it validate the document? Does the document need to end with a .xml file type extension for the plugin to validate it?

I'd appreciate any tips you could offer.  Thanks!

Jim 



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