RE: Neeing help starting a new book

by "Terence de Giere" <terence(at)humanfactors.com>

 Date:  Thu, 30 Nov 2000 12:08:14 -0600
 To:  "'Karen Harker'" <Karen.Harker(at)UTSouthwestern.edu>,
<hwg-gutenberg(at)hwg.org>
 In-Reply-To:  swmed
  todo: View Thread, Original
RE: Neeing help starting a new book

The document doesn't conform to the DTD.
There seem to be some elements in the document
that may have been the result of some
processing of the file or dumping the text into
XML
without converting restricted characters.
There are fragments of tags
such as in the email address below where it
appears
some of the text was converted to element
delimiters
or not escaped.


In the sampe below <Mikel(at)caere.com> looks like an
element
since < and > are not escaped. The parser in the
browser
then processes the file as if it were part of the
DTD
The document then does not conform to the
DTD and also is not well formed
either, so even without a style sheet
it will not parse.

<book>
<acknowledge>
Scanned by Charles Keller with
OmniPage Professional OCR software
donated by Caere Corporation, 1-800-535-7226.
Contact Mike Lough <Mikel(at)caere.com>
</acknowledge>



>From the XML specification:

The ampersand character (&) and the left angle
bracket (<) may appear in their literal form only
when used as markup delimiters, or within a
comment, a processing instruction, or a CDATA
section. If they are needed elsewhere, they must
be escaped using either numeric character
references or the strings "&amp;" and "&lt;"
respectively. The right angle bracket (>) may be
represented using the string "&gt;", and must, for
compatibility, be escaped using "&gt;" or a
character reference when it appears in the string
"]]>" in content, when that string is not marking
the end of a CDATA section.

Terence de Giere
terence(at)humanfactors.com




-----Original Message-----
From: owner-hwg-gutenberg(at)hwg.org
[mailto:owner-hwg-gutenberg(at)hwg.org]On
Behalf Of Karen Harker
Sent: Wednesday, November 29, 2000 11:30 AM
To: hwg-gutenberg(at)hwg.org
Subject: Neeing help starting a new book


I volunteered to convert my first book - Bellamy's
Looking Backward.  I have been a bit stymied by
some technical issues, however.

I've decided to use the bookfrag.dtd and
gutbook1.dtd, along with the darwin.css, and I
have copied them to a Web server in the same
folder as the XML file for the book.  When I try
to view the XML file in IE5, I get this error:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please
correct the error and then click the Refresh
button, or try again later.


--------------------------------------------------
------------------------------

Invalid xml declaration. Line 2, Position 3

<?xml version="1.0"?>
--^

=============================================

Here is the code at the top of the XML file:
<?xml version="1.0"?>

<!DOCTYPE gutbook SYSTEM "gutbook1.dtd">

<?xml-stylesheet type="text/css"
href="darwin.css"?>
============================================

What am I doing wrong? Here's the URL, if you want
to try it yourself:
http://www2.utsouthwestern.edu/cfdocs/library/xml/
gutenberg.xml

Thanks.



Karen R. Harker, MLS
UT Southwestern Medical Library
5323 Harry Hines Blvd.
Dallas, TX  75390-9049
214-648-1698
http://www.swmed.edu/library/

HWG: hwg-gutenberg mailing list archives, maintained by Webmasters @ IWA