You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2002/09/20 03:03:25 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl XMLDTDScannerImpl.java

neilg       2002/09/19 18:03:25

  Modified:    java/src/org/apache/xerces/impl XMLDTDScannerImpl.java
  Log:
  fix for bug 11994
  
  Revision  Changes    Path
  1.30      +10 -2     xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java
  
  Index: XMLDTDScannerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- XMLDTDScannerImpl.java	17 Sep 2002 20:48:35 -0000	1.29
  +++ XMLDTDScannerImpl.java	20 Sep 2002 01:03:24 -0000	1.30
  @@ -514,12 +514,20 @@
               reportEntity = peekReportEntity();
               // check well-formedness of the enity
               int startMarkUpDepth = popPEStack();
  +            // throw fatalError if this entity was incomplete and
  +            // was a freestanding decl
  +            if(startMarkUpDepth == 0 &&
  +                    startMarkUpDepth < fMarkUpDepth) {
  +                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
  +                                   "ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL",
  +                                   new Object[]{ fEntityManager.fCurrentEntity.name},
  +                                   XMLErrorReporter.SEVERITY_FATAL_ERROR);
  +            }
               if (startMarkUpDepth != fMarkUpDepth) {
                   reportEntity = false;
                   if (fValidation) {
                   // Proper nesting of parameter entities is a Validity Constraint
                   // and must not be enforced when validation is off
  -                // REVISIT: Should this be a fatal error? -Ac
                   fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                                              "ImproperDeclarationNesting",
                                              new Object[]{ name },
  
  
  

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