Re: Starting nxml-mode with specified schema
"Lennart Borgman (gmail)" <[email protected]>
| Newsgroups | gmane.emacs.nxml.general |
|---|---|
| Message-ID | <[email protected]> |
Dave Pawson wrote: > > > 2008/5/25 Lennart Borgman (gmail) <[email protected] > <mailto:lennart.borgman%40gmail.com>>: > > Lennart Borgman (gmail) wrote: > >> > >> > >> I would like to be able to start nxml-mode with a specified schema if > >> there is none specified in the file. (I do not want to save the schema > >> location since this should be for any file.) > >> > >> Is there a way to do this? > > <documentElement localName="locatingRules" > uri="/sgml/locate.rnc"/> > > <default uri="/sgml/schemas/docbookv5.rnc"/> > > </locatingRules> > > as the last entries in locating rules file. > > Any new xml file then uses the docbook schema Thanks Dave, sorry for beeing unclear, but I want to be able to do this from elisp. The selection of the specific schema might be a temporary thing. As an example a user might want to edit Genshi template file. Daniel wrote .rnc files for this and I want to have a function that sets the major mode to nxml-mode (or rather nxhtml-mode here) and then selects the schema that Daniel wrote. I wrote a little function for this (which I sent in another message) but it seems a bit clumsy. It first calls nxhtml-mode and that sets the schema. Then I set the schema once again to the Genshi schema. Another question: In the .rnc files you can do include: include "xhtml.rnc" Is there a way in elisp to specify a search path for the include? ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/emacs-nxml-mode/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/emacs-nxml-mode/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/