Re: [Psgml-user] psgml and namespaces ... I know ...
Brought to you by:
lenst
From: Dave P. <da...@dp...> - 2005-02-17 17:58:55
|
On Thu, 2005-02-17 at 17:34 +0100, lo...@fs... 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 |