Re: SGML validation
[email protected] Mon, 4 Nov 2002 10:47:21 +0100
| Newsgroups | gmane.emacs.xae |
|---|---|
| Message-ID | <OFA7DC21B0.9E0C7B01-ONC1256C67.002F987A-C1256C67.0035C639@is.chbs> |
Hi, for validation I use osgmls from the OpenJade project: http://sourceforge.net/projects/openjade and activate it like this: (if (eq 'windows-nt system-type) (progn (defun custom-xml-behavior() "Sets custom behavior for sgml mode" (interactive) (setq sgml-indent-data t) (setq sgml-declaration "c:/prog/sgml/dtd/xml.dcl") (setq sgml-validate-command "c:/prog/bin/onsgmls -wxml -c c:/prog/sgml/dtd/docbookx42/docbook.cat -s %s %s")) (add-hook 'xml-mode-hook 'custom-xml-behavior) ) ) The xml.dcl comes with openjade. The catalog for docbook is specified on the onsgmls commandline. For the DOCTYPE declaration I only have a work-around. The XML file looks like this: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "file:///c:/prog/sgml/dtd/docbookx42/docbookx.dtd" [ <!ENTITY % novalisEnts SYSTEM "novalisEntities.ent"> %novalisEnts; ]> <?xml-stylesheet href="novalisBookStyle_html.xsl" type="text/xsl"?> <book> &novalisContent; </book> If I want to validate I take out the "file:///..." line altogether. When I transform (using saxon) I leave it in. Not really elegant. But I never got validation with onsgmls *and* transforming with XSL to work on the identical file. Ekkehard _______________________________________________ XAE mailing list [email protected] http://sunsite.dk/mailman/listinfo/xae