|
From: Alan E. <ala...@gm...> - 2009-07-29 22:05:40
|
First of all, eric, I want to thank you very much for all the work you've done recently on the XML plugin. I think it is ready for a release on plugin central, so please post an announcement and I'll package and release it shortly. > Relax NG doesn't have any DOCTYPE or xsi:schemalocation instruction, to > tell what schema to use from an > instance document. So we must provide a way for the user to choose a > schema to validate the buffer. > > The nxml-mode for Emacs uses XML files (schemas.xml) containing various > rules to match schemas to documents. It is very powerful, given a > reasonable set of default rules. > > One can directly edit the schemas.xml files (the one in the directory of > the document takes precedence over the global one). > There are also a few actions : > > Set Schema > Automatically (default, chooses a schema based on URL, > prefix, local name and namespace of the root element) > Set Schema > For Document Type > (list of some predefined document types > : DocBook/RDF/RelaxNG/XHTML/XSLT/...) > Set Schema > Any Well Formed XML (this ones really means no schema > validation) > Set Schema > File... (choose a specific schema for this document) These are already permitted? Nice. > * What I have implemented in XML Plugin * > > - support for most of the rules in SchemaMapping.java > - dynamically insert validators in the parsing chain, based on these > rules in SchemaAutoLoader.java > - validation errors go nicely in the ErrorList, just like the > built-in DTD or XSD validation > - by the way, XSD schemas can be used just like RNG schemas (see > test_data/schema_loader). There is only the issue with multiple schemas > for documents with multiple namespaces (like test_data/import_schema), > having these working would need extending the syntax of the rules. Any idea why we keep seeing "can't find catalogmanager.properties" whenever the jars from the XML plugin are first loaded? Can we get rid of it? > * What I will likely do * > > - add the actions described above > - provide the most basic completion help, based on element names > > > * What I don't know yet * > > Would defining the global rules and document types via buttons and text > fields in the option pane be convenient ? I think actions are more convenient than the option panes, but it would be nice to be able to get a table view of all the ones that are already set, allowing you to edit/remove previously made ones. > - doctypes are easy : a two column table > - "Document Type" (an identifier, like "DocBook") > - "Schema URL" (an url) > > - rules are more diverse : basically they are composed of some > criteria and a target Document type or Schema URL, but here are the > details of the criteria : > - prefix+localname (one of them is sufficient) > - namespace > - exact URL (for the action "Set Schema > File...") > - URL pattern (eg. *.xsl <-> XSLT) > - transform URI (not implemented, allow to use XXX.rng for a > file XXX.xml) > - Doctype (not implemented) > - next rule (not implemented) > > - and with XML completion, it would make it easier to type in. |