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 bu...@apache.org on 2002/05/02 18:28:03 UTC

DO NOT REPLY [Bug 8746] New: - Strange/incorrect ? ordering of SAX events in case of error()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8746>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8746

Strange/incorrect ? ordering of SAX events in case of error()

           Summary: Strange/incorrect ? ordering of SAX events in case of
                    error()
           Product: Xerces2-J
           Version: 2.0.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: SAX
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: matja@seznam.cz


if instead of correct syntax

   <tag1 ....>
      <tag2 ...>     <--- tag2 is defined as mandatory in DTD 
         ... 
      </tag2>      
   </tag1>

XML document contains only 

   <tag1 .../>

following sequence of events is fired when parsing the document
with DTD validation turned ON:

   startElement("tag1")
   endElement("tag1")
   error()      <-- reports missing mandatory element tag2

Is this behaviour OK ?
It makes much more sense to do in this order

   startElement("tag1")
   error()      <-- reports missing tag2 BEFORE closing tag1
   endElement("tag1")

MaT

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org