After changing the taglib URIs (and changing my web.xml),
I still got the same behaviour.

I put a timestamp before the <x:parse ...>
and before the <x:forEach ...>  and after the </x:forEach>

Indeed, it is not the parsing that takes the time, it is the
"forEach" loop.

I looked for a more recent version of Xalan, but could only find
version 2.5.2 (26/10/2003). Putting that xalan.jar in my lib directory
did not help (perhaps I should do more, but I am new to java and would not
know what to do else)

We are going in production with our software, 1/may/2004.
Is it wise to continue developping with 1.1 (what i want to do) and
expect everything to be ok by the time we go in production ???
(I consider this as a major bug and think it will be solved soon)
Would you advise another way to handle the xml data ???

Regards,
Wim

-----Oorspronkelijk bericht-----
Van: Kris Schneider [mailto:[EMAIL PROTECTED]
Verzonden: vrijdag 6 februari 2004 16:19
Aan: Tag Libraries Users List
Onderwerp: Re: xml parsing difference 1.1 vs 1.0


The taglib URIs are not the same for 1.0 and 1.1.

JSTL 1.0:
http://java.sun.com/jstl/core
http://java.sun.com/jstl/xml

JSTL 1.1:
http://java.sun.com/jsp/jstl/core
http://java.sun.com/jsp/jstl/xml

AFAIK, 1.0 and 1.1 parse XML the same way. What may have changed is the way
<x:forEach> is handled. For example, I think 1.1 uses Xalan as its XPath
engine
whereas 1.0 uses Jaxen/SAXPath. If possible, I guess you could try a more
recent
version of Xalan.

Quoting Wim Goossens <[EMAIL PROTECTED]>:

> When I use the 1.1 standard and jstl jars, it takes ages to
> complete an xml parsing. With standard 1.0 I get an
> immediate result (for 300 records, for 20 records there is no problem).
>
> What could i be doing wrong ?
>
> (i am using tomcat 5.0.18 , j2sdk1.4.2_03)
>
> This is my jsp code :
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
> <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml"; %>
>
> ........
>
> (jx.result is a string containing the xml to parse)
>
> <x:parse varDom="dom" xml="${requestScope['jx.result']}" />
> <x:forEach var="country" select="$dom/countrys/country">
> <x:set var="id" select="string($country/id/text())"/>
> <x:set var="description" select="string($country/description/text())"/>
> <x:set var="countrycode" select="string($country/countrycode/text())"/>
>
> ......
>
> </x:forEach>
> <c:remove var="dom"/>
>
> Regards,
> Wim

--
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to