You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Brad O'Hearne <br...@neurofire.com> on 2001/04/17 19:08:25 UTC
Bug in Char validation test, possibly CDATA
Hey all,
I using a SAX2 parser to try to parse the following XML, and it is giving me
a FatalError in parsing that
The element type "JobDescription" must be terminated by the matching end-tag
"</JobDescription>".:
I have shown the full stack trace below the XML doc. Now if you look at the
JobDescription element, I tried another test, removing the '�' characters,
and the parsing worked. I just checked the specification, and the '&'
character falls into the Char legal character set. It appears that this is
a bug, either in Char testing, and/or in the CDATA section parsing. Can
someone confirm this? Any help is *greatly* appreciated on this one, as
this is an urgent one...(hopefully I am missing something simple). I have
also attached the xml and dtd files.
Thanks much!
BradO
XML doc:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JobFeed SYSTEM "JobFeed.dtd">
<JobFeed FeedSourceCode="ORL" FeedCreationDate="04/16/2001">
<CompleteFeed>
<JobAdTRX-Save JobAdCode="10327757">
<PublicationDate>04/01/2001</PublicationDate>
<ExpirationDate>04/28/2001</ExpirationDate>
<CompanyCode>162474</CompanyCode>
<CompanyName/>
<ContactEmail/>
<ApplyURL/>
<OriginalURL/>
<JobType/>
<AnnualSalary/>
<JobTitle><![CDATA[]]></JobTitle>
<SearchDescription>DRIVERSLABORERSCHECKERS?ForCoinPortEvergladesGoodW</Searc
hDescription>
<JobDescription><![CDATA[DRIVERS/LABORERS & CHECKERS - For Co in Port
Everglades. Good Wages, Benefits & 401K. CALL ��954-764-8988
�� ]]></JobDescription>
<JobDestinationList>
<JobDestination>
<DestinationCode/>
</JobDestination>
</JobDestinationList>
<JobCategoryAliasList><![CDATA[DRIVERS/LABORERS &
CHECKERS - ]]></JobCategoryAliasList>
<JobLocationList>
<JobLocation>
<DomesticLocation>
<RegionCode/>
<Address1/>
<Address2/>
<City/>
<StateProvince/>
<PostalCode/>
<Country/>
</DomesticLocation>
</JobLocation>
</JobLocationList>
</JobAdTRX-Save>
</CompleteFeed>
</JobFeed>
Stack trace:
org.xml.sax.SAXParseException: The element type "JobDescription" must be
terminated by the matching end-tag "</JobDescription>".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:969)
at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
ntScanner.java:634)
at
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne
r.java:683)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1187)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
RE: Bug in Char validation test, possibly CDATA
Posted by Brad O'Hearne <br...@neurofire.com>.
Please disregard this email...I don't know why it was sent twice. The
problem is already solved thanks to Curt Arnold. Thanks again Curt!
BradO
-----Original Message-----
From: Brad O'Hearne [mailto:brado@neurofire.com]
Sent: Tuesday, April 17, 2001 10:08 AM
To: Xerces-J User Mailing List; Xerces-J Dev Mailing List
Subject: Bug in Char validation test, possibly CDATA
Hey all,
I using a SAX2 parser to try to parse the following XML, and it is giving me
a FatalError in parsing that
The element type "JobDescription" must be terminated by the matching end-tag
"</JobDescription>".:
I have shown the full stack trace below the XML doc. Now if you look at the
JobDescription element, I tried another test, removing the '£' characters,
and the parsing worked. I just checked the specification, and the '&'
character falls into the Char legal character set. It appears that this is
a bug, either in Char testing, and/or in the CDATA section parsing. Can
someone confirm this? Any help is *greatly* appreciated on this one, as
this is an urgent one...(hopefully I am missing something simple). I have
also attached the xml and dtd files.
Thanks much!
BradO
XML doc:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JobFeed SYSTEM "JobFeed.dtd">
<JobFeed FeedSourceCode="ORL" FeedCreationDate="04/16/2001">
<CompleteFeed>
<JobAdTRX-Save JobAdCode="10327757">
<PublicationDate>04/01/2001</PublicationDate>
<ExpirationDate>04/28/2001</ExpirationDate>
<CompanyCode>162474</CompanyCode>
<CompanyName/>
<ContactEmail/>
<ApplyURL/>
<OriginalURL/>
<JobType/>
<AnnualSalary/>
<JobTitle><![CDATA[]]></JobTitle>
<SearchDescription>DRIVERSLABORERSCHECKERS?ForCoinPortEvergladesGoodW</Searc
hDescription>
<JobDescription><![CDATA[DRIVERS/LABORERS & CHECKERS - For Co in Port
Everglades. Good Wages, Benefits & 401K. CALL ££954-764-8988
££ ]]></JobDescription>
<JobDestinationList>
<JobDestination>
<DestinationCode/>
</JobDestination>
</JobDestinationList>
<JobCategoryAliasList><![CDATA[DRIVERS/LABORERS &
CHECKERS - ]]></JobCategoryAliasList>
<JobLocationList>
<JobLocation>
<DomesticLocation>
<RegionCode/>
<Address1/>
<Address2/>
<City/>
<StateProvince/>
<PostalCode/>
<Country/>
</DomesticLocation>
</JobLocation>
</JobLocationList>
</JobAdTRX-Save>
</CompleteFeed>
</JobFeed>
Stack trace:
org.xml.sax.SAXParseException: The element type "JobDescription" must be
terminated by the matching end-tag "</JobDescription>".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:969)
at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
ntScanner.java:634)
at
org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne
r.java:683)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1187)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org