cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
Subject Re: AntEater: a functional testing framework for HTTP/SOAP apps
Date Sat, 06 Oct 2001 17:53:45 GMT
On Sat, 6 Oct 2001 17:26:56 +1000, Jeff Turner <jeff@socialchange.net.au> wrote:

> > Would be interesting to see the xtags elements as well. Do you have a
> > URL to James work?
> 
> http://jakarta.apache.org/taglibs/doc/xtags-doc/intro.html
> 
>   "XTags is a JSP custom tag library for working with XML. XTags implements an
>   XSLT-like language allowing XML to be styled and processed from directly
>   within a JSP page using familiar XSLT and XPath techniques."

I took a look at it, and found it very cool! I use the same idea of
assigning XML fragments to variables in a Cocoon2 logicsheet I wrote,
which I call XScript. Using this capability, implementing the SOAP
logicsheet was a snap! I still have to find time to create a diff to
send. The problem is that at the last update from Cocoon2's CVS,
things are no longer working, and I need to look into the problem.

> In particular, I was thinking of it's XPath support. Eg, to iterate over and
> test all defined pipelines:
> 
> <xtags:forEach
>     id="pattern"
>     select="map:sitemap/map:pipelines/map:pipeline/map:match@pattern">
>   <http>
>     <httpRequest path="${pattern}">
>       <match responseCode="200"/>
>     </httpRequest>
>   </http>
> </xtags:forEach>
> 
> Ah well, presumably this sort of thing will be possible with the mythical Ant
> 2.

This should definitely be possible in Anteater. With this example, and
the syntax you described in an earlier email, you would do something
like this:

<http>
  <file path="build/webapp/cocoon/sitemap.xmap">
    <forEach assign="pattern"
             select="map:sitemap/map:pipelines/map:pipeline/map:match/@pattern">
      <httpRequest path="${pattern}">
        <match responseCode="200"/>
      </httpRequest>
    </forEach>
  </file>
</http>

Right now the XPath support in Anteater applies only to an HTTP
response or POST request, but it could be easily extended to files as
well.


Best regards,
-- 
Ovidiu Predescu <ovidiu@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

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


Mime
View raw message