Error on line 31 column 22 of
Error reported by XML parser: PE reference within decl in internal subset.
Transformation failed: run-time errors were reported
Yes, I've seen this in AElfred before, and it's a non-conformance. I think
AElfred is implementing the rule "In the internal DTD subset, parameter
entity references can occur only where markup declarations can occur", but
is failing to implement the exception: "(this does not apply to external
The spec says you can't use such PEs in the internal subset, unless it's in
text that was brought into the internal subset by means of another PE.
AElfred isn't implementing the "unless".
I sometimes wonder about the sanity of the people who dreamt up these rules,
it can only have been done as a torture-test for implementors, and the last
time I looked at the AElfred code I found it very hard to see how to fix it,
because by the time PEs are expanded, the distinction between stuff that's
in the internal subset because it was written there, and stuff that's there
because it was pulled in from elsewhere, has long disappeared. The easiest
fix would probably be to remove the restriction entirely, on the basis that
it would be better to accept incorrect XML than to reject correct XML.
The simple answer is, when you use DTDs written by an SGML guru, use a
> -----Original Message-----
> From: saxon-help-admin@...
> [mailto:saxon-help-admin@... Behalf Of
> Sent: 19 October 2001 08:42
> To: saxon@...
> Cc: saxon-help@...
> Subject: RE: [saxon] Aelfred errors
> > / "Michael Kay" <mhkay@...> was heard to say:
> > | > I've been given a file and dtd,
> > | > saxon (default parser) shows errors
> > | > nsgmls and rxp show it error free.
> > Does the DTD use external parameter entities? The version of AElfred
> > (and maybe others, I don't know) definitely gets the base URI of
> > external parameter entities wrong.
> External dtd subset 'redefines' attributes using entities
> which are also defined in an extension dtd defined using
> a parameter in the internal subset.
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE dtbook PUBLIC "-//NISO//DTD dtbook v1.0.0//EN"
> "dtbook100.dtd" [
> <!ENTITY % poemModule SYSTEM "dtbook3-poem.mod" >
> <!ENTITY % externalblock "| poem">
> <!ENTITY Imacr "I">
> <!ENTITY imacr "i">
> poemModule has
> <!ENTITY % coreattrs "id ID #IMPLIED
> class CDATA #IMPLIED
> style CDATA #IMPLIED
> title CDATA #IMPLIED ">
> <!ENTITY % attrs "%coreattrs;
> showin (xxx|xxp|xlx|xlp|bxx|bxp|blx|blp) #IMPLIED
> <!--Use: poem contains a poem
> <!ELEMENT poem ((hd | author)*, (linegroup | p | prodnote)+) >
> <!ATTLIST poem
> and the external dtd subset has
> <!ENTITY % coreattrs
> "id ID #IMPLIED
> class CDATA #IMPLIED
> style %StyleSheet; #IMPLIED
> title %Text; #IMPLIED">
> Aelfred reports
> C:\sgml\Daisy\niso\test>java -cp
> icl.saxon.StyleSheet -o op.html xm005.xml ..\dtb2html.xsl
> Error on line 31 column 22 of
> Error reported by XML parser: PE reference within decl in
> internal subset.
> Transformation failed: run-time errors were reported
> Which points to the attr entity definition in the poemModule file.
> Regards DaveP
> NOTICE: The information contained in this email and any
> attachments is
> confidential and may be legally privileged. If you are not the
> intended recipient you are hereby notified that you must not use,
> disclose, distribute, copy, print or rely on this email's content. If
> you are not the intended recipient, please notify the sender
> immediately and then delete the email and any attachments from your
> RNIB has made strenuous efforts to ensure that emails and any
> attachments generated by its staff are free from viruses. However, it
> cannot accept any responsibility for any viruses which are
> transmitted. We therefore recommend you scan all attachments.
> Please note that the statements and views expressed in this email
> and any attachments are those of the author and do not necessarily
> represent those of RNIB.
> RNIB Registered Charity Number: 226227
> Website: http://www.rnib.org.uk
> saxon-help mailing list