You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2005/06/26 17:34:51 UTC

svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Author: antonio
Date: Sun Jun 26 08:34:51 2005
New Revision: 201870

URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
Log:
Use org.w3c.dom.UserDataHandler instead of org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java?rev=201870&r1=201869&r2=201870&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/DomHelper.java Sun Jun 26 08:34:51 2005
@@ -31,7 +31,6 @@
 import org.apache.excalibur.xml.EntityResolver;
 import org.apache.excalibur.xml.sax.XMLizable;
 import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom3.UserDataHandler;
 import org.apache.xerces.parsers.DOMParser;
 import org.apache.xerces.xni.Augmentations;
 import org.apache.xerces.xni.NamespaceContext;
@@ -47,6 +46,7 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
+import org.w3c.dom.UserDataHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotSupportedException;

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java?rev=201870&r1=201869&r2=201870&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/woody/java/org/apache/cocoon/woody/util/DomHelper.java Sun Jun 26 08:34:51 2005
@@ -23,7 +23,6 @@
 import org.apache.commons.lang.BooleanUtils;
 import org.apache.excalibur.xml.sax.XMLizable;
 import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom3.UserDataHandler;
 import org.apache.xerces.parsers.DOMParser;
 import org.apache.xerces.xni.Augmentations;
 import org.apache.xerces.xni.NamespaceContext;
@@ -37,6 +36,7 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Text;
+import org.w3c.dom.UserDataHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotSupportedException;



Re: Xerces 2.7.0 in 2.1.8-dev (was Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java)

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:
> I wonder if somebody is having troubles with the new xerces version 
> 2.7.0. I found we need to place the new xerces.jar  and xml-apis.jar m 
> in java/lib/endorsed to make use of it.

Yes, lot of folks will have trouble with it. In many deployments, you can't 
modify vendor shipped libraries, and those include java rt, xalan, xerces, and 
container libraries (tomcat/websphere/weblogic/what have you).


> All in all, please step up if the change is not desired at all.

Change is required for controlled environments - as described above, so please 
go ahead.

Vadim

Xerces 2.7.0 in 2.1.8-dev (was Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java)

Posted by Antonio Gallardo <ag...@agssa.net>.
Antonio Gallardo wrote:

>On Lun, 27 de Junio de 2005, 11:45, Vadim Gritsenko dijo:
>  
>
>>Antonio Gallardo wrote:
>>    
>>
>>>On Lun, 27 de Junio de 2005, 8:34, Vadim Gritsenko dijo:
>>>
>>>      
>>>
>>>>antonio@apache.org wrote:
>>>>
>>>>        
>>>>
>>>>>Author: antonio
>>>>>Date: Sun Jun 26 08:34:51 2005
>>>>>New Revision: 201870
>>>>>
>>>>>URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
>>>>>Log:
>>>>>Use org.w3c.dom.UserDataHandler instead of
>>>>>org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.
>>>>>          
>>>>>
>>>>It means 2.1 won't run on older Xerces anymore. I think this is not
>>>>acceptable -
>>>>not at this moment anyway, when many containers are running with older
>>>>Xerces.
>>>>Please revert, for 2.1.
>>>>        
>>>>
>>>The problem is the old org.apache.xerces.dom3.UserDataHandler does not
>>>exists in the new Xerces version.
>>>
>>>What to do?
>>>      
>>>
>>There are at least two options:
>>
>>  * Go back to older xerces :-)
>>  * Check presense of the new xerces using reflection,
>>    and make sure code works with both old xerces and new one.
>>    
>>
>
>The easier is to go back. :-)
>
>I will revert xerces today at night in cocoon 2.1.x.
>  
>
I didn't the reversion because I was very busy + Sylvain suggested 
another way instead of reversion. I am planning this weekend to do the job.

Here is the Sylvain mail:

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111990875625491

I wonder if somebody is having troubles with the new xerces version 
2.7.0. I found we need to place the new xerces.jar  and xml-apis.jar m 
in java/lib/endorsed to make use of it.

All in all, please step up if the change is not desired at all.

Comments?

Best Regards,

Antonio Gallardo


Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Posted by Antonio Gallardo <ag...@agssa.net>.
On Lun, 27 de Junio de 2005, 11:45, Vadim Gritsenko dijo:
> Antonio Gallardo wrote:
>> On Lun, 27 de Junio de 2005, 8:34, Vadim Gritsenko dijo:
>>
>>>antonio@apache.org wrote:
>>>
>>>>Author: antonio
>>>>Date: Sun Jun 26 08:34:51 2005
>>>>New Revision: 201870
>>>>
>>>>URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
>>>>Log:
>>>>Use org.w3c.dom.UserDataHandler instead of
>>>>org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.
>>>
>>>It means 2.1 won't run on older Xerces anymore. I think this is not
>>>acceptable -
>>>not at this moment anyway, when many containers are running with older
>>>Xerces.
>>>Please revert, for 2.1.
>>
>>
>> The problem is the old org.apache.xerces.dom3.UserDataHandler does not
>> exists in the new Xerces version.
>>
>> What to do?
>
> There are at least two options:
>
>   * Go back to older xerces :-)
>   * Check presense of the new xerces using reflection,
>     and make sure code works with both old xerces and new one.

The easier is to go back. :-)

I will revert xerces today at night in cocoon 2.1.x.

Best Regards,

Antonio Gallardo


Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

> Antonio Gallardo wrote:

>> The problem is the old org.apache.xerces.dom3.UserDataHandler does not
>> exists in the new Xerces version.
>>
>> What to do?
>
>
> There are at least two options:
>
>  * Go back to older xerces :-)
>  * Check presense of the new xerces using reflection,
>    and make sure code works with both old xerces and new one.


Or use another approach that relies neiter on DOM3 nor on 
Xerces-specific extensions. I suggested a long time ago (see [1] 
"Implementation") a SAX filter that would add Locator information as 
attributes to get rid of CForms' LocationTrackingDOMParser, but the itch 
wasn't scratching enough.

Seems like the time has come now :-)

Sylvain

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106858374501055&w=2

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:
> On Lun, 27 de Junio de 2005, 8:34, Vadim Gritsenko dijo:
> 
>>antonio@apache.org wrote:
>>
>>>Author: antonio
>>>Date: Sun Jun 26 08:34:51 2005
>>>New Revision: 201870
>>>
>>>URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
>>>Log:
>>>Use org.w3c.dom.UserDataHandler instead of
>>>org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.
>>
>>It means 2.1 won't run on older Xerces anymore. I think this is not
>>acceptable -
>>not at this moment anyway, when many containers are running with older
>>Xerces.
>>Please revert, for 2.1.
> 
> 
> The problem is the old org.apache.xerces.dom3.UserDataHandler does not
> exists in the new Xerces version.
> 
> What to do?

There are at least two options:

  * Go back to older xerces :-)
  * Check presense of the new xerces using reflection,
    and make sure code works with both old xerces and new one.


> I want to add, I noted this version is faster and seems they fixed some
> bugs. We are using it right now in development and until now we don't
> found errors. If you have some problems with this new release, I will like
> to know about them.

Yes, I have. I won't be able to deploy Cocoon with this new Xerces for some time 
till all containers, servers are upgraded to it. For some people, it could be 
1/2 year to year. Cocoon 2.1 must continue to work on older Xerces releases to 
ensure compatiblity with existing infrastructure a lot of folks out there have. 
Not everybody can replace vital JDK parts on a whim.

If you see value in supporting new xerces, please use reflection.

Thanks,
Vadim

Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Posted by Antonio Gallardo <ag...@agssa.net>.
On Lun, 27 de Junio de 2005, 8:34, Vadim Gritsenko dijo:
> antonio@apache.org wrote:
>> Author: antonio
>> Date: Sun Jun 26 08:34:51 2005
>> New Revision: 201870
>>
>> URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
>> Log:
>> Use org.w3c.dom.UserDataHandler instead of
>> org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.
>
> It means 2.1 won't run on older Xerces anymore. I think this is not
> acceptable -
> not at this moment anyway, when many containers are running with older
> Xerces.
> Please revert, for 2.1.

Hi Vadim:

The problem is the old org.apache.xerces.dom3.UserDataHandler does not
exists in the new Xerces version.

What to do?

I want to add, I noted this version is faster and seems they fixed some
bugs. We are using it right now in development and until now we don't
found errors. If you have some problems with this new release, I will like
to know about them.

Best Regards,

Antonio Gallardo.


Re: svn commit: r201870 - in /cocoon/branches/BRANCH_2_1_X/src/blocks: forms/java/org/apache/cocoon/forms/util/DomHelper.java woody/java/org/apache/cocoon/woody/util/DomHelper.java

Posted by Vadim Gritsenko <va...@reverycodes.com>.
antonio@apache.org wrote:
> Author: antonio
> Date: Sun Jun 26 08:34:51 2005
> New Revision: 201870
> 
> URL: http://svn.apache.org/viewcvs?rev=201870&view=rev
> Log:
> Use org.w3c.dom.UserDataHandler instead of org.apache.xerces.dom3.UserDataHandler. Xerces now uses DOM Level 3.

It means 2.1 won't run on older Xerces anymore. I think this is not acceptable - 
not at this moment anyway, when many containers are running with older Xerces. 
Please revert, for 2.1.

Vadim