Re: psgml and namespaces ... I know ...
Dave Pawson <[email protected]> Thu, 17 Feb 2005 17:58:44 +0000
| Newsgroups | gmane.emacs.psgml.user |
|---|---|
| Message-ID | <1108663124.5573.52.camel@marge> |
On Thu, 2005-02-17 at 17:34 +0100, [email protected] wrote: > > Dear listmates > > this is not merely to produce some traffic in this otherwise > alarmingly quiet list, but also out of sheer exhaustion: > > I know, psgml supports neither schemas nor namespaces for XML (and > nobody seems inclined to implement either, sadly, although this is > more than understandable at least for the former). But is it possible > to tweak it just a little bit just so it recognises the colon > character as a letter or so, i. e. so it does not pack up when > encountering attribute names such as xml:lang? (add-hook 'sgml-mode-hook ; make all this stuff SGML-specific (function (lambda() ; everything in here will only apply in SGML mode (define-key sgml-mode-map [f5] 'sgml-comment) ; From Petr Flynn ;; Add '_' as a legal name character for PSGML (defun my-psgml-hook () (require 'psgml-parse) (modify-syntax-entry ?_ "w" sgml-parser-syntax)) (add-hook 'sgml-mode-hook 'my-psgml-hook) ;; Do the same again: add ':' as a legal name character for PSGML ;;This enables the use of namespace syntax in element type names. (defun her-psgml-hook () (require 'psgml-parse) (modify-syntax-entry ?: "w" sgml-parser-syntax)) (add-hook 'sgml-mode-hook 'her-psgml-hook) ))) ;; End of sgml specific hooks. No thanks to me. Thank Peter Flynn. HTH DaveP ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click