[
https://issues.apache.org/jira/browse/XERCESJ-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789690#action_12789690
]
Henry Zongaro commented on XERCESJ-1410:
----------------------------------------
Sorry this bug report has languished for so long. I tripped across this issue
in looking through older bug reports. This should have been reported against
Xerces rather than Xalan. In any event, the error that's being reported is
correct - or nearly so.
The attached XML document begins:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" [
<!ENTITY %HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" >
<!ENTITY %HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" >
<!ENTITY %HTMLspecial PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" >
The syntax for entity declarations in XML is:
[70] EntityDecl ::= GEDecl | PEDecl
[71] GEDecl ::= '<!ENTITY' S Name S EntityDef S? '>'
[72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
[74] PEDef ::= EntityValue | ExternalID
Note that the PEDecl is required to have whitespace between the % characters
and the name - that's missing in the entity declarations above.
[75] ExternalID ::= 'SYSTEM' S SystemLiteral
| 'PUBLIC' S PubidLiteral S SystemLiteral
The error message say "White space is required after "<!ENTITY" in the entity
declaration" rather than "White space is required after "%" in the entity
declaration," which might have caused confusion, since there is a space after
<!ENTITY.
By the way, after those typos in the entity declarations are corrected, there
are still errors in the XML document because no system ID appears after each
public ID in the entity declarations.
> Error in Parser
> ---------------
>
> Key: XERCESJ-1410
> URL: https://issues.apache.org/jira/browse/XERCESJ-1410
> Project: Xerces2-J
> Issue Type: Bug
> Components: DTD
> Environment: Jdk 1.6.0_02
> Reporter: Andrew Max
> Attachments: 2B1B01C9DF6E9C530CD267BCB8A321C0.fo
>
>
> Error message:
> org.xml.sax.SAXParseException: White space is required after "<!ENTITY" in
> the entity declaration
> XML Attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]