Print

Print


RE: The entity "hearts" was referenced, but not declared

Thanks for the reassurance, Terry. I've worked with enough students -- and have enough trepidations of my own -- that I'd rather control what they do to the DTD than pass out instructions and hope they all follow them exactly. Not a high probability on that.

  Wiz

Elizabeth H. Dow
Professor
School of Library and Information Science
Louisiana State University



-----Original Message-----
From: Encoded Archival Description List on behalf of Terry Catapano
Sent: Wed 2/1/2012 10:59 AM
To: [log in to unmask]
Subject: Re: The entity "hearts" was referenced, but not declared

I feel a caveat is in order that editing the DTD file might be preferable
in a closed system (like a classroom) where you can be sure everybody is
referring to the same DTD and you don't necessarily want to expose authors
to the murky and crooked paths of indirect declarations, but in most
contexts it would probably be wiser to specify the xmlchars entity's
inclusion in the DOCTYPE declaration in instance documents as Richard
described earlier in this thread:

<!DOCTYPE EAD PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival
Description (EAD)
Version 2002)//EN" [<!ENTITY % xmlchar 'INCLUDE'>]>

or

<!DOCTYPE EAD SYSTEM "ead.dtd" [
<!ENTITY % xmlchar 'INCLUDE'>]>

Specifying in the internal dtd subset makes the documents much more
portable since the declaration there takes precedence over whatever the
handling of the conditional inclusion of the xml characters is in the DTD
file used for validation.

Of course, for maximum portability, as Mark and Saasha point out, use of
the numeric character entities (or unicode characters) would be best since
they would not depend upon any entity or DTD files at all to pass
well-formedness checking.

As is often the case, there are many ways to do it. It's up to you to
decide which works best in your circumstances.

Hope this helps,

Terry




the On Wed, 1 Feb 2012,
Elizabeth H Dow wrote:

>
> Excellent solution!  I can do this in my copy of the DTD and then send it to
> the 22 students in the class.
>
> Thank you, again.
>
>   Wiz
>
> Elizabeth H. Dow
> Professor
> School of Library and Information Science
> Louisiana State University
>
>
>
> -----Original Message-----
> From: Encoded Archival Description List on behalf of Terry Catapano
> Sent: Tue 1/31/2012 7:21 PM
> To: [log in to unmask]
> Subject: Re: The entity "hearts" was referenced, but not declared
>
> Liz,
>
> I think you have to turn on the referencing of the xml character entities
> in line 927 of the DTD file.
>
> <!--=======================================================================
> -->
> <!--
>      E. CONDITIONAL SECTION: XML Character Entities
>
>      Entity name: xmlchar
>      Default: IGNORE
>
>    -->
> <!--=======================================================================
> -->
> <!ENTITY % xmlchar
>    'IGNORE'
>
> If the line reads IGNORE in your DTD file change to INCLUDE and see if it
> works.
>
> (why &amp; gives you and error is still a mystery, however...)
>
> I think this is explained somewhere in EAD documentation, I'll try
> to find it.
>
> Hope this helps,
>
> Terry
>
>
>
> On
> Tue, 31 Jan 2012, Elizabeth H Dow wrote:
>
> >
> > I've run into an issue with oXygen 13.2 that baffles me.
> >
> > I'm putting together a demonstration of how entities work for a class. I
> > tried to create the note "I &hearts; Ben &amp; Jerry's ice cream" to make
> my
> > point.
> >
> > I got the following error message: "The entity "hearts" was referenced,
> but
> > not declared" and the file does not parse.
> >
> > I found the following statement at line 907 of the DTD "By default, all
> > declared sets are referenced" which leads me to believe that I do not need
> > to declare the standard ISO entities individually.
> >
> > Can anyone offer any insight as to why I've hit this problem. FYI, I got
> the
> > same message for &amp; .
> >
> > Elizabeth H. Dow
> > Professor
> > School of Library and Information Science
> > Louisiana State University
> >
> >
> >
>
> Terry Catapano
> Special Collections Analyst/Librarian
> Columbia University Libraries Digital Program
> 212-854-9942
> [log in to unmask]
>
>
>

Terry Catapano
Special Collections Analyst/Librarian
Columbia University Libraries Digital Program
212-854-9942
[log in to unmask]