Re: [emacs-nxml-mode] editing xhtml fragments
- On 17 August 2011 19:19, Stephen Langer <stephen.langer@...> wrote:
>In which case provide the rnc schema for nxml-mode to use.
> On Aug 17, 2011, at 11:48 AM, Dave Pawson wrote:
>>> Thanks. I'd forgotten that I'd already done that. But I never figured out how to tell nxml that a file whose first xml tag was <chapter> or <para> is valid, because it's included in another file which contains the required surrounding tags.
>> Wrong tool
>> Validate on the command line,
> But isn't the whole point that nxml helps you write valid xml, by showing you your mistakes and suggesting and autocompleting the valid tags at any point? What's the point of using nxml if you have to validate outside of emacs?
nxml-mode doesn't hack xinclude or external entities.
>I didn't suggest it was. Modify the start element in one schema covering
>> or edit the rnc file to tell nxml-mode
>> that the entity can start on chapter?
> But I have lots of included files, and they aren't all chapters, and it's not practical to have separate rnc files for them all.
the entire included document.
> What would be useful would be for each file to contain a special comment that says what the enclosing elements are. I think I used to use psgml mode to do this. I don't remember exactly what prompted me to switch to nxml.
Revert to sgml-mode?
XSLT XSL-FO FAQ.
>>>>> Mihamina Rakotomandimby <mihamina@...>:You could try to "sudo apt-get install psgml"...?
> In my old Emacs, I used "M-x xml-mode" which drove me to the SGML mode.
> In Emacs 23 (Ubuntu Oneiric flavor), nXML mode takes it.
It may not bind to your XML documents file extensions in
auto-mode-alist, but that's easily fixed.
psgml is still present in oneiric: http://packages.ubuntu.com/oneiric/psgml
> The problem with nXML (and me) is:nXML has chosen a different approach.
> - the lone shortcut I use, C-c C-t (create tag) is not in use.
See my examples here for using nXML to insert tags and attributes: