Cool stuff, I'll be sure to check this out and see how it plays with nxml-mode.
BTW, do you also use planner? If so, can I put in a request for a schema for planner-xml as well? :) For a bunch of generated XML to look at, feel free to take a glance at: http://saint.corenova.com/planner/xml There are definitely XML docs with errors, but quite a few well-formed documents as well! Cheers, -Peter Brad Collins <[EMAIL PROTECTED]> writes: > Hi folks/ > > Attatched is a first pass at writing a schema for muse-xml. > > I used the Compact syntax of RelaxNG. RNC has a lot of advantages > over other schemas. It's far easier to read and write than the XML > syntax and it can easily be converted to DTD or XML Schema. > > RNC is very easy to learn -- it took less than a day for me. > > RNC is also the only supported type of schema supported by James > Clarke's nxml-mode which does inline validation. Install nxml-mode. > Run M-x muse-publish-this-file on a muse buffer. Then open > the the XML file that is created in nxml-mode. Type C-c C-s and you > will be prompted for the the schema file. The schema will load and > validate or try to validate the file. Anything underlined in red is > broken. As you debug and fix the file, use C-c C-a to reload the > schema. > > I have kept the schema very loose for the first draft. If everyone is > happy with the approach I took then I can go back and tighten up the > values for the type and level attributes. > > I also recommend doing a quick Google for rnc-mode which is very small > bur provides night font-locking for RNC files. > > A few Bugs. > > - The hard ruler element is printed as <hd> when it should be <hd />. > > - There doesn't seem to be any way of dealing with enumerated lists. > > A few suggestions: > > - The verse element should have a child element for each line. > > <verse> > <line>line of crud</line> > <line>line of crud</line> > </verse> > > - The root element page should be upper case PAGE, or changed to > something like MUSE, this is a common convention for the root > element in a markup language. > > - do tables need to wrap each <tr> in a <tbody>? > > <table> > <tbody><tr><td>stuff</td></td></tbody> > <tbody><tr><td>stuff</td></td></tbody> > <tbody><tr><td>stuff</td></td></tbody> > </table> > > I have written the schema to describe the above, but wouldn't it be > better like this: > > <table> > <tr><td>stuff</td></td> > <tr><td>stuff</td></td> > <tr><td>stuff</td></td> > </table> > > I already have papers assigned, so there shouldn't be any problem > including it with muse. > > I'll be happy to maintain the the muse schema/s on a regular basis. > They will have to be updated every time the muse-xml is tweaked. > > Please have a look and play around with the schema and let me know > what you want added or changed. > > Personally, I will use muse-xml via xml.el or xml-parse.el (which I > prefer) to convert the file into a list which is easily manipulated in > elisp. I've never been much of a fan of XSLT (also from James > Clarke). > > Cheers, > > b/ > > -- > Brad Collins <[EMAIL PROTECTED]>, Bangkok, Thailand > _______________________________________________ > emacs-wiki-discuss mailing list > emacs-wiki-discuss@nongnu.org > http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss -- B 01110011 01100001 01101001 01101110 01110100 ---------------------------------------------- Managing Member @ CORENOVA,LLC. M:919-641-6314 - let them be, just evolve. O:919-641-6314 ---------------------------------------------- 56 69 73 69 74 75 73 61 74: www.corenova.com CORENOVA> ./freedom. intoxicating. <RET> _______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss