You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sc...@lotus.com on 2000/07/18 01:33:02 UTC

Re: Resubmitting: [PATCH] remove dynamic validation from DTMLiaison.j ava

Sorry for the delay.  We have about 8 patches backlogged which we are
working on incorporating this week.  Myriam may have already incorporated
this particular patch today, I'm not sure.  We also need to run our full
regression suite on the patched code.

Our intention is to create our first patch-only release for Xalan 1.1,
probably sometime next week.  If other's have patches, now's the time to
submit them!

BTW, this whole dynamic validation thing is tremendously frustrating to me.
The way it works seems to keep changing in Xerces.  I agree with you about
the dynamic validation being turned off by default, except I would expect
that entity decls and default attributes would still be processed in this
case... not sure about lately, but at least at the time I wrote that code,
that wasn't the case (maybe a bug?).  The bottom line is, the processor
should be able to process the document correctly without having to know
anything about the document (including entities and default attributes
declared in the external doctype).  If, in the case you gave, with dynamic
validation turned off, the mdash entity does not get resolved, I would
argue that dynamic validation should be on by default (I agree with you
that there should be an API method to control it).

-scott




                                                                                                                      
                    mdelagra@us.brit                                                                                  
                    annica.com              To:     xalan-dev@xml.apache.org                                          
                                            cc:     (bcc: Scott Boag/CAM/Lotus)                                       
                    07/17/2000 05:49        Subject:     Resubmitting: [PATCH] remove dynamic validation from         
                    PM                      DTMLiaison.j ava                                                          
                    Please respond                                                                                    
                    to xalan-dev                                                                                      
                                                                                                                      
                                                                                                                      





-----Original Message-----
From: mdelagra@us.britannica.com [mailto:mdelagra@us.britannica.com]
Sent: Thursday, July 13, 2000 9:22 AM
To: xalan-dev@xml.apache.org
Subject: [PATCH] remove dynamic validation from DTMLiaison.java


Hi all,

Could a Committer please review and commit this patch?  Thanks.


Index: DTMLiaison.java
===================================================================
RCS file:
/home/cvspublic/xml-xalan/src/org/apache/xalan/xpath/dtm/DTMLiaison.java,v
retrieving revision 1.16
diff -u -r1.16 DTMLiaison.java
--- DTMLiaison.java       2000/05/26 05:50:21            1.16
+++ DTMLiaison.java       2000/07/13 14:17:33
@@ -225,11 +225,10 @@

         if(getUseValidation())
           parser.setFeature("http://xml.org/sax/features/validation",
true);
-        else
-        {
-          // This doesn't seem to work, but I'm a setting it anyhow.
-
parser.setFeature("http://apache.org/xml/features/validation/dynamic",
true);
-        }
+
+        // "http://xml.org/sax/features/validation/dynamic" is and should
be false
+        // by default.  It incorrectly decides to validate documents that
declare
+        // internal entities.

         if(m_doThreading)
         {



-----Original Message-----
From: mdelagra@us.britannica.com [mailto:mdelagra@us.britannica.com]
Sent: Tuesday, July 11, 2000 6:12 PM
To: xalan-dev@xml.apache.org
Subject: Bug in DTMLiaison.java concerning "dynamic validation"


Hi all,

There is a significant bug in DTMLiaison, version 1.16.  Scott B. created
the following block of code:

  if(getUseValidation())
    parser.setFeature("http://xml.org/sax/features/validation", true);
  else
  {
    // This doesn't seem to work, but I'm a setting it anyhow.
    parser.setFeature("http://apache.org/xml/features/validation/dynamic",
true);
  }

Unfortunately, dynamic validation does work :) and causes problems for
existing XML documents that worked in previous versions of Xalan.  Dynamic
validation blindly enables validation whenever it encounters a "DOCTYPE"
declaration.  This is not proper default behavior, because some XML
documents perform nonvalidating resolution of special characters in the
DOCTYPE declaration.  For example, the current version of Xalan attempts to
validate this legal nonvalidating XML document:

   <?xml version="1.0" ?>
  <!DOCTYPE article [
    <!ENTITY mdash "&#151;">
  ]>

  <article>
    this is my mdash &mdash;
  </article>

To make a long story short, dynamic validation should be disabled.  The
above code block should be replaced with this:

  if(getUseValidation())
    parser.setFeature("http://xml.org/sax/features/validation", true);

You may want to include a method in the XMLParserLiaison that allows a user
to enable it explicitly, but it should be disabled by default, as it is in
Xerces.  In the current API, there is no way to turn off dynamic
validation.
That's bad.

Incidentally, I thought we were supposed to submit bugs to
http://xml.apache.org/bugs, but I've never been able to gain access.  Is
the
bug database only accessible to certain people?

Thanks!

Morgan Delagrange
Britannica.com





Xalan direction question

Posted by Gary L Peskin <ga...@firstech.com>.
Scott et al --

Can you give some direction on the release strategy for Xalan 2.0?  I'd
like to suggest some code enhancements in the area of extension
functions.  In perusing the CVS repository, it seems like there have
been some significant changes in this area, particularly for
ExtensionFunctionHandler for 2.0.

1.  When is Xalan 2.0 scheduled for (pre)release?
2.  Should I bother with making changes in Xalan 1.1 in this area?
3.  Should I make changes in both 1.1 and 2.0?

TIA,
Gary

Scott_Boag@lotus.com wrote:
> 
> 
> Our intention is to create our first patch-only release for Xalan 1.1,
> probably sometime next week.  If other's have patches, now's the time to
> submit them!
>