commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: jakarta-commons-sandbox/jelly/xdocs pipeline.xml navigation.xml
Date Wed, 11 Dec 2002 20:02:46 GMT
jstrachan    2002/12/11 12:02:46

  Modified:    jelly/xdocs navigation.xml
  Added:       jelly/xdocs pipeline.xml
  Added a new document on XML pipelining with Jelly
  Revision  Changes    Path
  1.17      +10 -9     jakarta-commons-sandbox/jelly/xdocs/navigation.xml
  Index: navigation.xml
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/navigation.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- navigation.xml	20 Sep 2002 13:44:38 -0000	1.16
  +++ navigation.xml	11 Dec 2002 20:02:46 -0000	1.17
  @@ -9,28 +9,29 @@
         <item name="Overview"                href="/index.html"/>
         <item name="FAQ"                     href="/faq.html"/>
         <item name="Getting Started"         href="/gettingstarted.html"/>
  -      <item name="Tutorial"         	   href="/tutorial.html"/>
  +      <item name="Tutorial"         	     href="/tutorial.html"/>
         <item name="Detail"                  href="/overview.html"/>
  -      <item name="Tag Reference"           href="/tags.html"/>
         <item name="Download"                href=""/>
       <menu name="Community">
         <item name="News Blog"			         href=""/>
  -      <item name="IRC"					           href="/irc.html"/>
  +      <item name="IRC"					   				 href="/irc.html"/>
         <item name="Powered By"              href="/powered.html"/>
         <item name="To Do List"              href="/todo.html"/>
  -    <menu name="Libraries">
  +    <menu name="Features">
         <item name="JellyUnit"               href="/jellyunit.html"/>
         <item name="JellySwing"              href="/jellyswing.html"/>
  +      <item name="XML Pipeline"            href="/pipeline.html"/>
  +      <item name="Tag Reference"           href="/tags.html"/>
       <menu name="Jakarta Community">
  -        <item name="Get Involved"           href=""/>
  -        <item name="License"                href=""/>
  -        <item name="Mailing Lists"          href=""/>
  -        <item name="CVS Repositories"       href=""/>
  -        <item name="Who We Are"             href=""/>
  +			<item name="Get Involved"            href=""/>
  +			<item name="License"                 href=""/>
  +			<item name="Mailing Lists"           href=""/>
  +			<item name="CVS Repositories"        href=""/>
  +			<item name="Who We Are"              href=""/>
  1.1                  jakarta-commons-sandbox/jelly/xdocs/pipeline.xml
  Index: pipeline.xml
  <?xml version="1.0"?>
    <title>XML Pipelines</title>
    <author email="">James Strachan</author>
  <section name="XML Pipelines">
  Rather like the Cocoon project, Jelly also supports the concept of <i>XML pipelines</i>.
  The idea in an XML pipeline is for XML events to be created by some generator and then
  flow through multiple filters, transformers or processors to some ultimate output.
  Currently XML events are implemented via <a href="">SAX</a>.

  <subsection name="A Jelly script is a compiled SAX stream">
  Jelly compiles XML into a <a href="apidocs/org/apache/commons/jelly/Script.html">Script</a>.
  This mechanism works just the same whether the document is totally static, partially dynamic,

  with just a few dynamic expressions inside it, or its totally dynamic using XML pipelines
or invoking SOAP services etc.
  Jelly effectively turns XML into an executable Script that when its run will output XML
  So this is effectively a dynamic XML event cache. The Script can contain dynamic fragments.
  This means that at runtime, there is no need to parse the script as the compiled Script
can be cached which avoids unnecessary 
  XML parsers while still keeping content dynamic.
  <subsection name="Using Tags as source, filter, transformation or destination in a pipeline">
  Each Jelly <a href="apidocs/org/apache/commons/jelly/Tag.html">Tag</a> 
  is given an <a href="apidocs/org/apache/commons/jelly/XMLOutput.html">XMLOutput</a>

  instance when it is invoked via the doTag() method. 
  The XMLOutput instance is a simple lightweigtht wrapper around SAX 
  ContentHandler and LexicalHandler instances allowing a Tag to take part in any 
  kind of SAX based processing of XML events.
  A Jelly Tag can choose how to invoke its body. So it could 
  		optionally evaluate its body based on some condition
  		loop over its body via some iteration
  		parse its body into some DOM model or turn the XML events into some kind of Java objects

  		or other kind of data structure
  		perform some arbitrary XML event transformation, like XSLT or apply some SAX Filter etc.
  		output the XML events to some destination
  This means that by nesting Jelly tags together its possible to create simple or complex
XML pipelines 
  which can be easily integrated with expression languages (like Jexl and XPath) 
  or scripting languages (like JavaScript, Jython etc) as well as using other technologies
such as
  		parsing XML, transforming it with XSLT or using XPath via the <a href="">xml</a>
  		parsing HTML via the <a href="tags.html#jelly:html">html</a> library
  		performing XML validation against DTD, XML Schema or RelaxNG using the <a href="tags.html#jelly:validate">validate</a>
  		performing SOAP operations via Apache Axis with the <a href="tags.html#jelly:soap">soap</a>
  		mixing and matching the processing of XML in pipelines with support for other libraries
  		Ant, SQL, HTTP, JMS etc.
  It should be noted that highly complex, yet easy to use XML pipelines can be created since
  pipelines don't have to be linear. At any point in the chain, custom logic can decide what
to do next.
    &lt;j:if test="${myBean.fooEnabled('uk')}&gt;
      &lt;j:file name="${userdir}/results.html"&gt;
        &lt;x:transform xslt="asHTML.xsl"&gt;
          &lt;soap:invoke endpoint="http://com.myserver/..."&gt;
            &lt;x:transform xslt="foo.xsl"&gt;
              &lt;x:parse xml="${myBean.getSomeURL()}"/&gt;

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message