ALFS DTD Syntax Doc v3.1 (XML & DTD Syntax)

Kevin P. Fleming kpfleming at
Sat Jun 5 19:36:52 PDT 2004

James Robertson wrote:


I'm reviewing the current book at this URL, and will post messages 
relating to individual chapters and/or pages so they can be handled 

First, somehow the book needs to be run through a spell-checker :-) I 
don't know how that can be done with XML source, but if there's a way it 
would be nice. The first example is on this page, "occurance" -> 
"occurrence". I know there will be some spelling issues I will flag 
because I write American English and others write British English; if 
that is the only reason the word is spelled differently I don't care :-)

Quick Intro:

"With XML, whitespace is preserved" -> "XML parsers preserve _all_ 
whitespace in XML documents, even that which is considered non-significant"

"With XML, CR/LF is converted to LF"... I don't know what this is 
relevant to, is there a reference where someone needs to know this? It's 
not something that I have ever cared about working with XML files for ALFS.

There should be a statement that in XML documents, every occurrence of 
the "&" character is _always_ an entity reference, with no exceptions 
except for CDATA. This is something that beginning profile writers 
sometimes have difficulty picking up on. The simplest way to describe 
the reason for this is that XML parsers do not "back track" to determine 
whether an "&" looks like it may or may not be the start of an entity 
reference, the syntax is designed to be parsed by a very simple parser.

In fact, this page should have a sub-section talking about the use of 
the standard entities (&amp, &lt, &gt, &apos).

The section that describes element children definitions in DTDs makes no 
reference to the fact that the children are also defined in the _order_ 
that they are allowed appear. This is very important if you want your 
XML to be DTD-valid, although it really doesn't affect an ALFS profile 

More information about the alfs-discuss mailing list