XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] SGML default attributes.

On 05/04/2016 12:16 PM, Norman Gray wrote:
> I can't remember if there was a trivial or default DTD which was
> assumed in the absence of a declared one,

Nope.

> Practical aspect: When I'm writing XML, I use a DTD (in whatever
> syntax) to help Emacs tell me if the document is valid, but I don't
> even know whether the XML parsers I use are capable of using a DTD
> external subset.

I do the same. If you are using psgml's xml-mode (the one which parses a
DTD so that it is tag-aware), then you can install the OpenSP package
which provides the onsgmls validating parser, and xml-mode's C-c C-v
command will validate your XML document using this if you tell Emacs

(setq sgml-xml-declaration "/usr/share/xml/declaration/xml.dcl")
(setq sgml-xml-validate-command "onsgmls -wxml -s %s %s")

You need to make sure that you do have xml.dcl there (or change it).
The -s suppresses output of the instance and just gives you any errors.
You can even still use the old catalog method for dereferencing FPIs:

(setq sgml-catalog-files '("catalog" "/usr/local/lib/sgml/CATALOG"))

This is ancient stuff, but it works, and it lets you use Emacs as a
decent XML editor for documents using DTDs. I wish nxml-mode had the
document-editing facilities of xml-mode!

///Peter


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS