Re: nsgmls
"peter" <[email protected]> Wed, 7 Jul 2004 13:53:46 +0000
| Newsgroups | gmane.emacs.psgml.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 07 Jul 2004 13:36:07 +0200, Christophe Gaubert wrote > [email protected] a écrit : > > I have no experience with docbook myself, but it is of course somewhat > > amazing that such a DTD should contain faulty definitions or faulty DocBook is not faulty. > Thank you for your long answer. In fact, someone has found the > solution in another list ([email protected]) : I > have to give the xml.dcl file to nsgmls : nsgmls -wxml -s > /usr/share/sgml/xml.dcl MyFile.xml That's correct: DocBook is [now] XML and therefore requires the SGML Declaration for XML before it will validate. This is built into native XML parsers, but nsgmls is both an SGML parser *and* an XML parser, so you have to give it the Declaration explicitly. > With this command, it remains a warning : > nsgmls:/usr/share/sgml/xml.dcl:1:W: SGML declaration was not > implied And the solution is : [on one line] Yep. XML *requires* the SGML Declaration for XML: it's fixed and cannot be varied, unlike SGML applications, which can each have their own Declaration if necessary. nsgmls is just warning you that it was not using the implied Reference Concrete Syntax (which is what SGML applications use if they do not have their own Declaration). > nsgmls -wxml -wno-explicit-sgml-decl -s /usr/share/sgml/xml.dcl MyFile.xml > > At this time, I don't know what is this file xml.dcl. I will search later... It's the SGML Declaration for XML. It's required to make XML a true subset of SGML. It's what tells SGML parsers that all elements must have both start-tags and end-tags present, that it can use a wider range of characters, that element types declared as EMPTY must use the /> syntax, and to turn off most of SGML's clever but rarely-used features. If you use a native XML parser (eg rxp) it's not needed, because native XML parsers don't handle non-XML SGML at all, so they have the Declaration built in. ///Peter ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com