2002-10-27 (Sun) [長年日記]

XSLT-processxslide

XSLT で遊びたくなり XSLT-process と xslide を導入。XSLT の step 実行ができる debugger 付き。いい感じ。

Saxon と Xalan を切り替えて実行できるが、Xalan は変換のみで step 実行などはまだできない模様。

;; XSL mode
(autoload 'xsl-mode "xslide" "Major mode for XSL stylesheets." t)
 
;; Turn on font lock when in XSL mode
(add-hook 'xsl-mode-hook
	  'turn-on-font-lock)
 
(setq auto-mode-alist
      (append
       (list
	'("\\.fo" . xsl-mode)
	'("\\.xsl" . xsl-mode))
       auto-mode-alist))
 
;; Uncomment if using abbreviations
(abbrev-mode t)
 
(autoload 'xslt-process-mode "xslt-process" "Emacs XSLT processing" t)
(autoload 'xslt-process-install-docbook "xslt-process"
  "Register the DocBook package with XSLT-process" t)
(add-hook 'sgml-mode-hook 'xslt-process-mode)
(add-hook 'xml-mode-hook 'xslt-process-mode)
(add-hook 'xsl-mode-hook 'xslt-process-mode)
 
(defadvice xml-mode (after run-xml-mode-hooks act)
  "Invoke `xml-mode-hook' hooks in the XML mode."
  (run-hooks 'xml-mode-hook))