xml-general-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject cvs commit: xml-site/targets/cocoon/userdocs/transformers encodeurl-transformer.html sourcewriting-transformer.html
Date Mon, 15 Jul 2002 14:01:31 GMT
shannon     2002/07/15 07:01:31

  Added:       targets/cocoon/userdocs/concepts xmlform.html
               targets/cocoon/userdocs/generators linkstatus-generator.html
               targets/cocoon/userdocs/selectors parameter-selector.html
               targets/cocoon/userdocs/transformers
                        encodeurl-transformer.html
                        sourcewriting-transformer.html
  Log:
  release 2.0.3 update
  
  Revision  Changes    Path
  1.1                  xml-site/targets/cocoon/userdocs/concepts/xmlform.html
  
  Index: xmlform.html
  ===================================================================
  <html xmlns:NetUtils="org.apache.cocoon.util.NetUtils">
  <head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>XMLForm Handling</title>
  <STYLE type="text/css">
  a.menu {
  	color: #FFFFFF;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:plain;
      text-decoration:none;
      padding-left: 14px
  }
  
  A.menu:hover {
  	color: #FFCC00
  }
  
  
  .menutitle {
  	color: #000000;
      text-align:left;               
      font-size:10px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 8px
  }
  .menuselected {
  	color: #FFCC00;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 14px
  }
  </STYLE>
  </head>
  <body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
  </tr>
  <tr>
  <td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">XMLForm Handling</font></td>
  </tr>
  <tr>
  <td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
  <table width="288" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr width="100%">
  <td align="left" valign="top" width="120">
  <table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
  <tr>
  <td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Concepts</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="index.html">Overview</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="sitemap.html">Sitemap</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="views.html">Views</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="caching.html">Caching</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="actions.html">Actions</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="matchers_selectors.html">Matchers and Selectors</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="catalog.html">Entity Catalogs</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="mrustore.html">MRUMemoryStore</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="persistence.html">Persistence</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="storejanitor.html">StoreJanitor</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xmlsearching.html">XMLSearching</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">XMLForm</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="databases.html">Databases</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="modules.html">Modules</a></td>
  </tr>
  <tr>
  <td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  </table>
  </td><td>
  <table cellspacing="15" cellpadding="0" border="0">
  <tr>
  <td>
    
    
      <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Notice</font>
  <hr style="color: #0086b2" size="1">
        
  <p>
  <font color="black" face="verdana,helvetica,sanserif">This document is based on components included in the current Cocoon 2.1
        distribution. If you do not have this version, you can obtain it from
        the <a href="../../index.html">Apache Cocoon</a> web site. Be sure
        to look at the WARNING document that accompanies such pre-release versions.
        </font>
  </p>
      
  
      
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Introduction</font>
  <hr style="color: #0086b2" size="1">
        
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The XMLForm framework is inspired by Apache Jakarta Struts and
        W3C XForms.</font>
  </p>
  
        
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Its goal is to:</font>
  </p>
  
        
  <blockquote>
  <ul>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">Ease the development of sophisticated web applications
        utilizing complex data types and multi-page transactions</font>
  </li>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">Provide an automated 2 way mapping between
        
        HTML Forms &lt;-&gt; XML &lt;-&gt; JavaBeans
        </font>
  </li>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">Use standard XML schema languages like XML Schema, Relax-NG,
        Schematron for data validation</font>
  </li>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">Promote complete reuse of Cocoon Actions for:</font>
  </li>
        
  <blockquote>
  <ul>
          
  <li>
  <font face="verdana, helvetica, sans serif">UI centric web applications - HTML, WML, UXL, VoiceML,
          etc.</font>
  </li>
          
  <li>
  <font face="verdana, helvetica, sans serif">Web Services (based on the REST paradigm)</font>
  </li>
          
  <li>
  <font face="verdana, helvetica, sans serif">Remote Portal Forms. (An interactive extension of static
          content formats like Netscape RSS)</font>
  </li>
        
  </ul>
  </blockquote>
        
  <li>
  <font face="verdana, helvetica, sans serif">Utilize XPath tools like Apache Jakarta Commons JXPath for
        read/write access to JavaBeans, DOM nodes and mixed objects.</font>
  </li>
        
  <li>
  <font face="verdana, helvetica, sans serif">Utilize the existing Cocoon XML functional testing framework
        - AntEater.</font>
  </li>
        
  </ul>
  </blockquote>
  
        
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The current implementation offers the following features:</font>
  </p>
  
        
  <blockquote>
  <ol>
          
  <li>
  <font face="verdana, helvetica, sans serif">Automated 2 way binding of HTML Forms to JavaBeans (and DOM
          nodes) through XPath</font>
  </li>
          
  <li>
  <font face="verdana, helvetica, sans serif">Automatic validation of JavaBeans(and DOM nodes) through
          Schematron schemas</font>
  </li>
          
  <li>
  <font face="verdana, helvetica, sans serif">Intermediate XForms like XML markup for form views</font>
  </li>
        
  </ol>
  </blockquote>
      
  
      
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Background</font>
  <hr style="color: #0086b2" size="1">
        
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The aim of XMLForm, is to build and edit an xml document
        (called the instance), subject to constraints from some schema
        (XMLSchema, Schematron, ...), through a sequence of form pages.
        The instance is either a dom-document or a Java bean-structure or
        a mix. XMLForm consist, of three main components:</font>
  </p>
  
        
  <blockquote>
  <ul>
        
  <li>
  <font face="verdana, helvetica, sans serif">Form - is responsible for the instance and validation of it.
        Form objects are stored in request attributes for one page forms
        and session attributes for wizards (multi page forms). A Form can
        be populated from the request parameters. This is the "model in
        MVC terms.</font>
  </li>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">XMLFormTransformer - takes a form descriptor, (similar to
        XForms) as input and  fill it with data and error messages from a
        Form object that is referred in an attribute. This is the "view"
        in MVC terms.</font>
  </li>
  
        
  <li>
  <font face="verdana, helvetica, sans serif">AbstractXMLFormAction, (WizardAction) - creates the Form
        object if necessary and populates it with data based on the
        request parameters. It can also take care of flow handling and
        checkbox state. This is the "controller" in MVC terms.</font>
  </li>
        
  </ul>
  </blockquote>
  
      
  
      
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Demonstration</font>
  <hr style="color: #0086b2" size="1">
       
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
        In version 2.1, see XMLForm in action with the by selecting:
        <code><font face="courier, monospaced">http://localhost:8080/cocoon/samples/xmlform/"</font></code>.
       
       </font>
  </p>
      
  
      
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Further information</font>
  <hr style="color: #0086b2" size="1">
      
  <p>
  <font color="black" face="verdana,helvetica,sanserif">See the
       <a href="../../howto/xmlform-wizard/howto-xmlform-wizard.html">Cocoon XMLForm How-To</a>
      </font>
  </p>
  
      
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Please discuss Cocoon XMLForm on the
      <a href="../../mail-lists.html">mailing lists</a>
      </font>
  </p>
  
      
    
  
  </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
  </tr>
  <tr>
  <td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
  </tr>
  </table>
  </body>
  </html>
  
  
  
  1.1                  xml-site/targets/cocoon/userdocs/generators/linkstatus-generator.html
  
  Index: linkstatus-generator.html
  ===================================================================
  <html xmlns:NetUtils="org.apache.cocoon.util.NetUtils">
  <head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LinkStatus Generator</title>
  <STYLE type="text/css">
  a.menu {
  	color: #FFFFFF;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:plain;
      text-decoration:none;
      padding-left: 14px
  }
  
  A.menu:hover {
  	color: #FFCC00
  }
  
  
  .menutitle {
  	color: #000000;
      text-align:left;               
      font-size:10px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 8px
  }
  .menuselected {
  	color: #FFCC00;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 14px
  }
  </STYLE>
  </head>
  <body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
  </tr>
  <tr>
  <td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">LinkStatus Generator</font></td>
  </tr>
  <tr>
  <td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
  <table width="288" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr width="100%">
  <td align="left" valign="top" width="120">
  <table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
  <tr>
  <td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Generators</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="generators.html">Overview</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Default</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="file-generator.html">File Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Core</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="html-generator.html">HTML Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="directory-generator.html">Directory Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="imagedirectory-generator.html">Image Directory Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extractor-generator.html">Fragment Extractor Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="jsp-generator.html">JSP Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="script-generator.html">Script Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="serverpages-generator.html">Server Pages Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="velocity-generator.html">Velocity Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="request-generator.html">Request Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="status-generator.html">Status Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="stream-generator.html">Stream Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="profile-generator.html">Profile Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="error-generator.html">Error Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="search-generator.html">Search Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">LinkStatus Generator</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Optional</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="php-generator.html">Php Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xmldb-generator.html">XML:DB Generator</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xmldbcollection-generator.html">XML:DB Collection Generator</a></td>
  </tr>
  <tr>
  <td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  </table>
  </td><td>
  <table cellspacing="15" cellpadding="0" border="0">
  <tr>
  <td>
   
   
    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">LinkStatus Generator</font>
  <hr style="color: #0086b2" size="1">
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The LinkStatus Generator emits a list of links that are reachable. Please note that it is available only in Cocoon 2.1.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The LinkStatusGenerator has serveral configuration options.
     </font>
  </p>
     
  <blockquote>
  <font face="verdana, helvetica, sans serif">
  <dl>
       
  <dt>
  <strong>include-name</strong> - </dt>
       
  <dd>RE pattern for including links
         <br>
         By default <code><font face="courier, monospaced">include-name</font></code> is empty.
       </dd>
       
  <dt>
  <strong>exclude-name</strong> - </dt>
       
  <dd>RE pattern for excluding links.
         <br>
         By default <code><font face="courier, monospaced">exclude-name</font></code> is defined as
         <code><font face="courier, monospaced">.*\.gif(\?.*)?$,
           .*\.png(\?.*)?$,
           .*\.jpe?g(\?.*)?$,
           .*\.js(\?.*)?$,
           .*\.css(\?.*)?$
         </font></code>.
       </dd>
       
  <dt>
  <strong>link-content-type</strong> - </dt>
       
  <dd>expected MIME type of xml document requested on view
         <i>link-query-view</i>
         
  <br>
         By default <code><font face="courier, monospaced">link-content-type</font></code> is set to 
         <code><font face="courier, monospaced">application/x-cocoon-links</font></code>.
       </dd>
       
  <dt>
  <strong>link-view-query</strong> - </dt>
       
  <dd>A query-string appended to the crawling URL
         <br>
         By default <code><font face="courier, monospaced">link-view-query</font></code> is set to
         <code><font face="courier, monospaced">cocoon-view=links</font></code>.
       </dd>
       
  <dt>
  <strong>user-agent</strong> - </dt>
       
  <dd>HTTP user-agent for requesting links,
         By default <code><font face="courier, monospaced">user-agent</font></code> is set to
         value of <code><font face="courier, monospaced">org.apache.cocoon.Constants.COMPLETE_NAME</font></code>,
         ie. <code><font face="courier, monospaced">Apache Cocoon 2.1-dev</font></code>
       
  </dd>
       
  <dt>
  <strong>accept</strong> - </dt>
       
  <dd>Not currently used</dd>
     
  </dl>
  </font>
  </blockquote>
     
  <blockquote>
  <ul>
      
  <li>
  <font face="verdana, helvetica, sans serif">Name : linkStatus</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.generation.LinkStatusGenerator</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Cacheable: no.</font>
  </li>
     
  </ul>
  </blockquote>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      A simple example might help to use the LinkStatusGenerator effectivly:
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      Add the LinkStatusGenerator to the components in your sitemap.xmap
     </font>
  </p>
  
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  ...
  &lt;map:components&gt;
  ...
    &lt;map:generators default="file"&gt;
    ...
      &lt;map:generator name="linkStatus"
        src="org.apache.cocoon.generation.LinkStatusGenerator"/&gt;
    &lt;/map:generators&gt;
    &lt;map:serialize default="html"&gt;
      &lt;map:serializer name="links"
        src="org.apache.cocoon.serialization.LinkSerializer"/&gt;
    &lt;/map:serialize&gt;
  &lt;/map:components&gt;
  &lt;map:views&gt;
    &lt;map:view&gt;
      &lt;map:view from-position="last" name="links"&gt;
        &lt;map:serialize type="links"/&gt;
      &lt;/map:view&gt;
      ...
  &lt;/map:view&gt;
  </pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
       Next define in your pipeline to use the LinkStatusGenerator
     </font>
  </p>
  
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  &lt;map:match pattern="/linkStatus"&gt;
    &lt;map:generate type="linkStatus" name="my-root"/&gt;
    ...
    &lt;map:serialize/&gt;
  &lt;/map:match&gt;
  </pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  
    
   
  
  </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
  </tr>
  <tr>
  <td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
  </tr>
  </table>
  </body>
  </html>
  
  
  
  1.1                  xml-site/targets/cocoon/userdocs/selectors/parameter-selector.html
  
  Index: parameter-selector.html
  ===================================================================
  <html xmlns:NetUtils="org.apache.cocoon.util.NetUtils">
  <head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Parameter Selector</title>
  <STYLE type="text/css">
  a.menu {
  	color: #FFFFFF;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:plain;
      text-decoration:none;
      padding-left: 14px
  }
  
  A.menu:hover {
  	color: #FFCC00
  }
  
  
  .menutitle {
  	color: #000000;
      text-align:left;               
      font-size:10px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 8px
  }
  .menuselected {
  	color: #FFCC00;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 14px
  }
  </STYLE>
  </head>
  <body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
  </tr>
  <tr>
  <td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Parameter Selector</font></td>
  </tr>
  <tr>
  <td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
  <table width="288" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr width="100%">
  <td align="left" valign="top" width="120">
  <table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
  <tr>
  <td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Selectors</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="selectors.html">Overview</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Default</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Core</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Parameter</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Optional</span></td>
  </tr>
  <tr>
  <td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  </table>
  </td><td>
  <table cellspacing="15" cellpadding="0" border="0">
  <tr>
  <td>
   
   
    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Parameter Selector</font>
  <hr style="color: #0086b2" size="1">
     
     
  <blockquote>
  <ul>
      
  <li>
  <font face="verdana, helvetica, sans serif">Name : ParameterSelector</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.selection.ParameterSelector</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Cacheable: not applicable</font>
  </li>
     
  </ul>
  </blockquote>
     
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      This Selector matches a string, in the Parameters object passed to the 
      selector, against a specified Cocoon internal parameter.  It performs a 
      case-sensitive string comparison between the value of the 
      'parameter-selector-test' parameter and the value of the 'test' 
      attribute of the <code><font face="courier, monospaced">&lt;map:when ...&gt;</font></code> element.
     </font>
  </p>
     
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     This internal parameter could be:
     </font>
  </p>
     
  <blockquote>
  <ul>
      
  <li>
  <font face="verdana, helvetica, sans serif">A sitemap parameter from the <code><font face="courier, monospaced">&lt;map:match ...&gt;</font></code> portion of the pipeline</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">A sitemap parameter set by an action</font>
  </li>
     
  </ul>
  </blockquote>
     
     
     
     
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Reasons to use ParameterSelector</font>
  <hr style="color: #0086b2" size="1">
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     One purpose of this selector is to choose between different components 
     of a pipeline based on sitemap parameters set by an action.  This would 
     allow the action to control the logic required to set one or more parameters, 
     which can then be used by this selector to control pipeline processing.  
     Thus, complex decision-making logic can be contained in actions, while the 
     sitemap simply uses the results of the actions (the parameters) to determine 
     pipeline processing.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     Parameter Selector can also be used to select on the value of 'keys' 
     (such as {1} or {../2} ) from the wildcard matcher.  Information in the 
     URI, such as part of a filename, can then be used to determine pipeline 
     processing.   
     </font>
  </p>
     
     
     
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Examples</font>
  <hr style="color: #0086b2" size="1">
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     Add the component to your sitemap.xmap:
     </font>
  </p>
     
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
     &lt;map:components&gt;
      ...
      &lt;map:selectors&gt;
       ...
       &lt;map:selector
  	    name="parameter"
        	logger="sitemap.selector.parameter"
        	src="org.apache.cocoon.selection.ParameterSelector"/&gt;
       ...</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
     
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     Use a parameter set by an action:
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      Assume there is an action (named MyAction) that sets a parameter 
      (named MyRegion) to several possible values.  For more information on actions, 
      including a simple example of an action that creates a sitemap parameter, see
      <a href="../concepts/actions.html">Creating and Using Actions</a>.
     </font>
  </p>
     
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
     &lt;map:match pattern="*.xml"&gt;
      &lt;map:act type="MyAction"&gt;
        &lt;map:generate src="{../1}.xml"/&gt;
  
        &lt;map:select type="parameter"&gt;
          &lt;map:parameter name="parameter-selector-test" value="{MyRegion}"/&gt;
        
          &lt;!-- executes iff the value of MyRegion equals 
               "United States" (without quotes) --&gt;
          &lt;map:when test="United States"&gt;
            &lt;map:transform src="stylesheets/us.xsl"/&gt;
          &lt;/map:when&gt;
        
          &lt;map:when test="South_America"&gt;
            &lt;map:transform src="stylesheets/southamerica.xsl"/&gt;
          &lt;/map:when&gt;
  
          &lt;map:when test="Europe"&gt;
            &lt;map:transform src="stylesheets/europe.xsl"/&gt;
          &lt;/map:when&gt;
  
          &lt;map:otherwise&gt;
            &lt;map:transform src="all_others.xsl"
          &lt;/map:otherwise&gt;
  
        &lt;/map:select&gt;
      &lt;/map:act&gt;
      &lt;map:serialize/&gt;
    &lt;/map:match&gt;</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
     
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
     Use values from the URI:
     </font>
  </p>
     
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
     &lt;map:pipeline&gt;
       &lt;!-- {1}/{2}/myfile.xml --&gt;
       &lt;map:match pattern="**/*/myfile.xml"&gt; 
     
         &lt;!-- Use ParameterSelector --&gt;
         &lt;map:select type="parameter"&gt;
          &lt;map:parameter name="parameter-selector-test" value="{2}"/&gt;
  
          &lt;!-- executes iff the value of {2} equals 
               "basic" (without quotes); the requested URI
                could be **/basic/myfile.xml --&gt;
          &lt;map:when test="basic"&gt;
              &lt;map:generate src="{1}/myfile.xml"/&gt;
              &lt;map:transform src="stylesheets/basic.xsl"&gt;
                  &lt;map:parameter name="use-request-parameters" value="true"/&gt;
                  &lt;map:parameter name="resource" value="{2}.html"/&gt;
              &lt;/map:transform&gt;
              &lt;map:serialize/&gt;
          &lt;/map:when&gt;
  
          &lt;map:when test="aggregate"&gt;
              &lt;map:aggregate element="site"&gt;
          	&lt;map:part src="cocoon:/{1}/sidebar-{1}/{2}.xml"/&gt;
          	&lt;map:part src="cocoon:/body-{1}/{2}.xsp"/&gt;
              &lt;/map:aggregate&gt;
              &lt;map:transform src="stylesheets/aggregate2xhtml.xsl"/&gt;
              &lt;map:serialize/&gt;
          &lt;/map:when&gt;
  
          &lt;map:otherwise&gt;
              &lt;map:redirect-to uri="other_URI"/&gt;
          &lt;/map:otherwise&gt;
  
        &lt;/map:select&gt;
      &lt;/map:match&gt; 
      ...</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
     
     
   
  
  </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
  </tr>
  <tr>
  <td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
  </tr>
  </table>
  </body>
  </html>
  
  
  
  1.1                  xml-site/targets/cocoon/userdocs/transformers/encodeurl-transformer.html
  
  Index: encodeurl-transformer.html
  ===================================================================
  <html xmlns:NetUtils="org.apache.cocoon.util.NetUtils">
  <head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>EncodeURL Transformer</title>
  <STYLE type="text/css">
  a.menu {
  	color: #FFFFFF;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:plain;
      text-decoration:none;
      padding-left: 14px
  }
  
  A.menu:hover {
  	color: #FFCC00
  }
  
  
  .menutitle {
  	color: #000000;
      text-align:left;               
      font-size:10px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 8px
  }
  .menuselected {
  	color: #FFCC00;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 14px
  }
  </STYLE>
  </head>
  <body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
  </tr>
  <tr>
  <td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">EncodeURL Transformer</font></td>
  </tr>
  <tr>
  <td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
  <table width="288" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr width="100%">
  <td align="left" valign="top" width="120">
  <table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
  <tr>
  <td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Transformers</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="transformers.html">Overview</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Default</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xslt-transformer.html">XSLT Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Core</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extractor-transformer.html">Fragment Extractor Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="i18n-transformer.html">I18n Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="log-transformer.html">Log Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="sql-transformer.html">SQL Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="filter-transformer.html">Filter Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="readdomsession-transformer.html">Read DOM Session Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="writedomsession-transformer.html">Write DOM Session Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xinclude-transformer.html">XInclude Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="cinclude-transformer.html">CInclude Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">EncodeURL Transformer</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="sourcewriting-transformer.html">SourceWriting Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Optional</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xt-transformer.html">XT Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="ldap-transformer.html">LDAP Transformer</a></td>
  </tr>
  <tr>
  <td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  </table>
  </td><td>
  <table cellspacing="15" cellpadding="0" border="0">
  <tr>
  <td>
   
   
    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">EncodeURL Transformer</font>
  <hr style="color: #0086b2" size="1">
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The encodeURL transformer emits encoded URLs.
      This transformer applies encodeURL method to URLs.
      You may want to use this transform to avoid doing the manually
      encodeURL() call.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      Usually this transformer is appended as last transformer before
      the serialization process. In this case it is possible to encode
      URLs introduced in the generator, and xslt transformer phase.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      You can specify which attributes hold URL values in order to restrict
      URL rewriting to specific attributes only. In the current implementation
      you specify include, and exclude patterns as regular expressions, concatting
      element-name + "/@" + attribute-name.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The EncodeURLTransformer has serveral configuration options. These options
      may be specified in the sitemap, or by each request.
     </font>
  </p>
     
  <blockquote>
  <font face="verdana, helvetica, sans serif">
  <dl>
       
  <dt>
  <strong>include-name</strong> - </dt>
       
  <dd>RE pattern for including attributes from encode URL rewriting, 
         The attribute values are encoded, if an 
         expressions of the form <code><font face="courier, monospaced">element-name/@attribute-name</font></code>
         matches.
         <br>
         By default <code><font face="courier, monospaced">include-name</font></code> is defined as
         <code><font face="courier, monospaced">.*/@href|.*/@action|frame/@src</font></code>.
       </dd>
       
  <dt>
  <strong>exclude-name</strong> - </dt>
       
  <dd>RE pattern for excluding attributes from encode URL rewriting,
         The attribute values are not encoded, if an 
         expressions of the form <code><font face="courier, monospaced">element-name/@attribute-name</font></code>
         matches.
         <br>
         By default <code><font face="courier, monospaced">exclude-name</font></code> is defined as
         <code><font face="courier, monospaced">img/@src</font></code>.
       </dd>
     
  </dl>
  </font>
  </blockquote>
     
  <blockquote>
  <ul>
      
  <li>
  <font face="verdana, helvetica, sans serif">Name : encodeURL</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.transformation.EncodeURLTransformer</font>
  </li>
      
  <li>
  <font face="verdana, helvetica, sans serif">Cacheable: yes.</font>
  </li>
     
  </ul>
  </blockquote>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      A simple example might help to use the EncodeURLTransformer effectivly:
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      Add the EncodeURLTransformer to the components in your sitemap.xmap
     </font>
  </p>
  
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  ...
  &lt;map:components&gt;
  ...
    &lt;map:transformers default="xslt"&gt;
    ...
      &lt;map:transformer name="encodeURL"
        src="org.apache.cocoon.transformation.EncodeURLTransformer"&gt;
        &lt;!-- default configuration, explicitly defined --&gt;
        &lt;include-name&gt;.*/@href|.*/@action|frame/@src&lt;/include-name&gt;
        &lt;exclude-name&gt;img/@src&lt;/exclude-name&gt;
      &lt;/map:transformer&gt;
    ...
  </pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
       Next define in your pipeline to use the EncodeURLTransformer
     </font>
  </p>
  
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  &lt;map:match pattern="*.xsp"&gt;
    &lt;map:generate type="serverpages" name="docs/samples/xsp/{1}.xsp"/&gt;
    &lt;map:transform src="stylesheets/page/simple-page2html.xsl"/&gt;
    
    &lt;map:transform type="encodeURL"/&gt;
    &lt;map:serialize/&gt;
  &lt;/map:match&gt;
  </pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      In this example pipeline it is assumed that the attribute
      <code><font face="courier, monospaced">href</font></code> of element <code><font face="courier, monospaced">a</font></code> contains an URL which should get 
      encoded.
      Moreover the attribute <code><font face="courier, monospaced">action</font></code> of any element contains an URL
      which should get encoded, too.
      Finally the attribute <code><font face="courier, monospaced">src</font></code> of element 
      <code><font face="courier, monospaced">frame</font></code> should get encoded, too.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The attribute <code><font face="courier, monospaced">src</font></code> of element <code><font face="courier, monospaced">img</font></code> is excluded from
      encoding.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
       In other words, images are served regardless of the current session, in contrast
       anchor links, form actions, and frame src are served depending on the current session.
     </font>
  </p>
     
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
      The encoding itself applies the servlet method <code><font face="courier, monospaced">response.encodeURL()</font></code>
      upon the URL.
     </font>
  </p>
    
   
  
  </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
  </tr>
  <tr>
  <td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
  </tr>
  </table>
  </body>
  </html>
  
  
  
  1.1                  xml-site/targets/cocoon/userdocs/transformers/sourcewriting-transformer.html
  
  Index: sourcewriting-transformer.html
  ===================================================================
  <html xmlns:NetUtils="org.apache.cocoon.util.NetUtils">
  <head>
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Source Writing Transformer</title>
  <STYLE type="text/css">
  a.menu {
  	color: #FFFFFF;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:plain;
      text-decoration:none;
      padding-left: 14px
  }
  
  A.menu:hover {
  	color: #FFCC00
  }
  
  
  .menutitle {
  	color: #000000;
      text-align:left;               
      font-size:10px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 8px
  }
  .menuselected {
  	color: #FFCC00;
      text-align:left;               
      font-size:12px;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-weight:bold;
      padding-left: 14px
  }
  </STYLE>
  </head>
  <body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
  <td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
  </tr>
  <tr>
  <td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Source Writing Transformer</font></td>
  </tr>
  <tr>
  <td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
  <table width="288" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr width="100%">
  <td align="left" valign="top" width="120">
  <table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
  <tr>
  <td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Transformers</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="transformers.html">Overview</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Default</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xslt-transformer.html">XSLT Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Core</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="extractor-transformer.html">Fragment Extractor Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="i18n-transformer.html">I18n Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="log-transformer.html">Log Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="sql-transformer.html">SQL Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="filter-transformer.html">Filter Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="readdomsession-transformer.html">Read DOM Session Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="writedomsession-transformer.html">Write DOM Session Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xinclude-transformer.html">XInclude Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="cinclude-transformer.html">CInclude Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="encodeurl-transformer.html">EncodeURL Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">SourceWriting Transformer</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
  <span class="menutitle">Optional</span></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="xt-transformer.html">XT Transformer</a></td>
  </tr>
  <tr xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.NetUtils">
  <td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="ldap-transformer.html">LDAP Transformer</a></td>
  </tr>
  <tr>
  <td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
  </td>
  </tr>
  </table>
  </td><td>
  <table cellspacing="15" cellpadding="0" border="0">
  <tr>
  <td>
  	
  	
  		<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Source Writing Transformer</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Diverts xml from a pipeline, writing it to a Source.</font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Thankfully, <code><font face="courier, monospaced">FileSource</font></code> is no longer the only <code><font face="courier, monospaced">Source</font></code> that currently implements <code><font face="courier, monospaced">WritableSource</font></code>; there are implementations of WebDAV and Apache Slide WritableSources in the scratchpad. Hopefully further <code><font face="courier, monospaced">WriteableSource</font></code> implementations (XMLDB, CVS, Email, SQL, etc.) will be appear in the future.</font>
  </p>
  			
  <blockquote>
  <ul>
  				
  <li>
  <font face="verdana, helvetica, sans serif">Name : write-source</font>
  </li>
  				
  <li>
  <font face="verdana, helvetica, sans serif">Class: org.apache.cocoon.transformation.SourceWritingTransformer</font>
  </li>
  				
  <li>
  <font face="verdana, helvetica, sans serif">Cacheable: no.</font>
  </li>
  			
  </ul>
  </blockquote>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">If you have built Cocoon with the ScratchPad included (using: <code><font face="courier, monospaced">./build.sh  -Dinclude.webapp.libs=yes -Dinclude.scratchpad.libs=yes webapp</font></code>), there is a set of samples set up, including tests at <code><font face="courier, monospaced">http://localhost:8080/cocoon/mount/editor/tests</font></code> and a demonstration editor at <code><font face="courier, monospaced">http://localhost:8080/cocoon/mount/editor/edit/</font></code></font>
  </p>
  			
  <p>
  <table border="0" cellpadding="0" cellspacing="3" width="100%">
  <tr>
  <td valign="top" width="28"><img alt="Note" border="0" hspace="0" vspace="0" height="29" width="28" src="images/note.gif"></td><td valign="top"><font color="black" face="verdana,helvetica,sanserif" size="-1"><i>Please beware of putting these samples on a public-facing server.</i></font></td>
  </tr>
  </table>
  </p>
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">The Tags</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  				
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  					
  		&lt;source:write&gt;
  			[&lt;source:path/&gt;]
  			&lt;source:source/&gt;
  			&lt;source:fragment/&gt;
  		&lt;/source:write&gt;
  		
  		&lt;source:insert/&gt;
  			&lt;source:path/&gt;
  			&lt;source:source/&gt;
  			&lt;source:fragment/&gt;
  			[&lt;source:replace/&gt;]
  			[&lt;source:reinsert/&gt;]
  		&lt;/source:insert&gt;
  					
  				</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  			
  </font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">In the namespace <code><font face="courier, monospaced">xmlns:source="http://apache.org/cocoon/source/1.0"</font></code>.</font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The contents of the <code><font face="courier, monospaced">&lt;source:fragment/&gt;</font></code> tag are written to the specified WriteableSource when the document containing it is transformed by SourceWritingTransformer.</font>
  </p>
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Definition</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  				
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  					
   &lt;map:transformer name="write-source" 
      src="org.apache.cocoon.transformation.SourceWritingTransformer"&gt;
  		&lt;map:parameter name="serializer" value="xml"/&gt;  
   &lt;/map:transformer/&gt;
  					
  				</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  			
  </font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The SourceWritingTransformer is predefined for you in the main SiteMap.</font>
  </p>
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Invocation</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">This invokes the SourceWritingTransformer on your pipeline.</font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  				
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  					
   &lt;map:transform type="write-source"/&gt;
  					
  				</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  			
  </font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Or you can over-ride the default serializer here.</font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  				
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  					
   &lt;map:transform type="write-source"&gt;
     &lt;map:parameter name="serializer" value="my-special-serializer"/&gt;   
   &lt;/map:transform&gt;
  					
  				</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  			
  </font>
  </p>
  		
  
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">The Tags in detail</font>
  <hr style="color: #0086b2" size="1">
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>source:write</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The source:write tag can take optional attributes, <code><font face="courier, monospaced">create</font></code> (defaults to 'true') and <code><font face="courier, monospaced">serializer</font></code> (defaults to the serializer set up in the definition or invocation of the transformer).</font>
  </p>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Replaces the entire content of a <code><font face="courier, monospaced">Source</font></code> (specified by the <code><font face="courier, monospaced">&lt;source:source/&gt;</font></code> tag) with the contents of the <code><font face="courier, monospaced">&lt;source:fragment/&gt;</font></code> tag, if @create is 'true', a new asset will be created if one does not already exist.</font>
  </p>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The <code><font face="courier, monospaced">&lt;source:source/&gt;</font></code> and <code><font face="courier, monospaced">&lt;source:fragment/&gt;</font></code> tags are required, a <code><font face="courier, monospaced">&lt;source:path/&gt;</font></code> tag is optional, if specified, the value is an used as an XPath to generate xml in your <code><font face="courier, monospaced">Source</font></code>, inwhich to wrap your content.</font>
  </p>
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:source</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The System ID of the <code><font face="courier, monospaced">Source</font></code> to be written to.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: <code><font face="courier, monospaced">&lt;source:source&gt;docs/blah.xml&lt;/source:source&gt;</font></code> or <code><font face="courier, monospaced">&lt;source:source&gt;context:/blah.xml&lt;/source:source&gt;</font></code> etc.</font>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:fragment</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The XML Fragment to be written.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: 
  						<div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  							
  	&lt;source:fragment&gt;&lt;foo&gt;
  			&lt;bar id="dogcow"/&gt;
  		&lt;/foo&gt;&lt;/source:fragment&gt;
  							
  						</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div> 
  						or
  						<div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  							
  	&lt;source:fragment&gt;
  		&lt;foo/&gt;
  		&lt;bar&gt;
  			&lt;dogcow/&gt;
  		&lt;bar/&gt;
  	&lt;/source:fragment&gt;
  							
  						</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div> 
  						etc.
  					</font>
  </p>
  					
  <p>
  <table border="0" cellpadding="0" cellspacing="3" width="100%">
  <tr>
  <td valign="top" width="28"><img alt="Note" border="0" hspace="0" vspace="0" height="29" width="28" src="images/note.gif"></td><td valign="top"><font color="black" face="verdana,helvetica,sanserif" size="-1"><i>The second example type, can only be used when the <code><font face="courier, monospaced">&lt;source:path/&gt;</font></code> tag has been specified.</i></font></td>
  </tr>
  </table>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:path</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">[Optional] XPath to specify how your content is wrapped</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: <code><font face="courier, monospaced">&lt;source:path&gt;doc&lt;/source:path&gt;</font></code> - your content is placed inside a <code><font face="courier, monospaced">&lt;doc/&gt;</font></code> root tag.</font>
  </p>
  					
  <p>
  <table border="0" cellpadding="0" cellspacing="3" width="100%">
  <tr>
  <td valign="top" width="28"><img alt="Note" border="0" hspace="0" vspace="0" height="29" width="28" src="images/note.gif"></td><td valign="top"><font color="black" face="verdana,helvetica,sanserif" size="-1"><i>If this parameter is omitted, your content MUST have only ONE top-level node.</i></font></td>
  </tr>
  </table>
  </p>
  				
   			
  
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>source:insert</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The source:insert tag can take optional attributes, <code><font face="courier, monospaced">create</font></code> (defaults to 'true') and <code><font face="courier, monospaced">serializer</font></code> (defaults to the serializer set up in the definition or invocation of the transformer).</font>
  </p>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Inserts into a <code><font face="courier, monospaced">Source</font></code> (specified by the <code><font face="courier, monospaced">&lt;source:source/&gt;</font></code> tag) the contents of the tag <code><font face="courier, monospaced">&lt;source:fragment/&gt;</font></code> at the XPath location specified in the <code><font face="courier, monospaced">&lt;source:path/&gt;</font></code> tag, if @create is 'true', a new <code><font face="courier, monospaced">Source</font></code> will be created if one does not already exist.</font>
  </p>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The <code><font face="courier, monospaced">&lt;source:source/&gt;</font></code>, <code><font face="courier, monospaced">&lt;source:path/&gt;</font></code> and <code><font face="courier, monospaced">&lt;source:fragment/&gt;</font></code> tags are all required, the <code><font face="courier, monospaced">&lt;source:replace/&gt;</font></code> and <code><font face="courier, monospaced">&lt;source:reinsert/&gt;</font></code> tags are optional.</font>
  </p>
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:source</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The System ID of the <code><font face="courier, monospaced">Source</font></code> to be inserted into.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: <code><font face="courier, monospaced">&lt;source:source&gt;docs/blah.xml&lt;/source:source&gt;</font></code> or <code><font face="courier, monospaced">&lt;source:source&gt;context:/blah.xml&lt;/source:source&gt;</font></code> etc.</font>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:fragment</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The XML Fragment to be written.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: 
  						<div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  							
  	&lt;source:fragment&gt;
  		&lt;foo&gt;
  			&lt;bar id="dogcow"/&gt;
  		&lt;/foo&gt;
  	&lt;/source:fragment&gt;
  							
  						</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div> 
  						or
  						<div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  							
  	&lt;source:fragment&gt;
  		&lt;foo/&gt;
  		&lt;bar&gt;
  			&lt;dogcow/&gt;
  		&lt;bar/&gt;
  	&lt;/source:fragment&gt;
  							
  						</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div> 
  						etc.
  					</font>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:path</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif"></font>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:replace</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">[Optional] XPath (from <code><font face="courier, monospaced">&lt;source:path/&gt;</font></code>) to select the node that is replaced by your new content</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: <code><font face="courier, monospaced">&lt;source:replace&gt;foo/bar/dogcow/@status='cut'&lt;/source:replace&gt;</font></code> (is equivalent to this in XSLT: <code><font face="courier, monospaced">select="foo[bar/dogcow/@status='cut']"</font></code>), what gets replaced is the <code><font face="courier, monospaced">&lt;foo/&gt;</font></code> which has a <code><font face="courier, monospaced">&lt;bar/&gt;</font></code> with a <code><font face="courier, monospaced">&lt;dogcow status="cut"/&gt;</font></code> in it.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">The <code><font face="courier, monospaced">overwrite</font></code> attribute of the parent <code><font face="courier, monospaced">&lt;source:insert/&gt;</font></code> is used to check if replacing is allowed. If <code><font face="courier, monospaced">overwrite</font></code> is 'true' (the default) the node is replaced. If <code><font face="courier, monospaced">overwrite</font></code> is 'false' the node is only inserted if the replace node is found.</font>
  </p>
  				
  				
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2">source:reinsert</font>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">[Optional] The XPath (relative to <code><font face="courier, monospaced">&lt;source:replace/&gt;</font></code>) to backup the contents of the overwritten node to.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">eg: <code><font face="courier, monospaced">&lt;source:reinsert&gt;foo/versions&lt;/source:reinsert&gt;</font></code> or <code><font face="courier, monospaced">&lt;source:reinsert&gt;/doc/versions/foo&lt;/source:reinsert&gt;</font></code>.</font>
  </p>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">If specified and a node is replaced, all children of this replaced node will be reinserted at the given path.</font>
  </p>
  				
   			
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Notes</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <blockquote>
  <ul>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'replace' is not specified, your 'fragment' is appended as a child of 'path'.</font>
  </li>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'replace' is specified and it exists and 'overwrite' is true, your 'fragment' is inserted in 'path', before 'replace' and then 'replace' is deleted.</font>
  </li>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'replace' is specified and it exists and 'overwrite' is false, no action occurs.</font>
  </li>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'replace' is specified and it does not exist and 'overwrite' is true, your 'fragment' is appended as a child of 'path'.</font>
  </li>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'replace' is specified and it does not exist and 'overwrite' is false, your 'fragment' is appended as a child of 'path'.</font>
  </li>
  						
  <li>
  <font face="verdana, helvetica, sans serif">if 'reinsert' is specified and it does not exist, no action occurs.</font>
  </li>
  					
  </ul>
  </blockquote>
  				
  </font>
  </p>
  			
  		
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Examples</font>
  <hr style="color: #0086b2" size="1">
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Simple Write</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  						
   &lt;page&gt;
     ...
     &lt;source:write xmlns:source="http://apache.org/cocoon/source/1.0"&gt;
       &lt;source:source&gt;context://doc/editable/my.xml&lt;/source:source&gt;      
       &lt;source:fragment&gt;&lt;page&gt;
         &lt;title&gt;Hello World&lt;/title&gt;
         &lt;content&gt;
           &lt;p&gt;This is my first paragraph.&lt;/p&gt;
         &lt;/content&gt;
       &lt;/page&gt;&lt;/source:fragment&gt;
     &lt;/source:write&gt;
     ...
   &lt;/page&gt;
  						
  					</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  				
  </font>
  </p>
  			
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Insert at end</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  						
   &lt;page&gt;
     ...
     &lt;source:insert xmlns:source="http://apache.org/cocoon/source/1.0"&gt;
       &lt;source:source&gt;context://doc/editable/my.xml&lt;/source:source&gt;      
       &lt;source:path&gt;page/content&lt;/source:path&gt;      
       &lt;source:fragment&gt;
         &lt;p&gt;This paragraph gets &lt;emp&gt;inserted&lt;/emp&gt;.&lt;/p&gt;
         &lt;p&gt;With this one, at the end of the content.&lt;/p&gt;
       &lt;/source:fragment&gt;
     &lt;/source:insert&gt;
     ...
   &lt;/page&gt;
  						
  					</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  				
  </font>
  </p>
  			
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Replace</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  						
   &lt;page&gt;
     ...
     &lt;source:insert xmlns:source="http://apache.org/cocoon/source/1.0"&gt;
       &lt;source:source&gt;context://doc/editable/my.xml"&lt;/source:source&gt;      
       &lt;source:path&gt;page/content&lt;/source:path&gt;      
       &lt;source:replace&gt;p[1]&lt;/source:replace&gt;      
       &lt;source:fragment&gt;
         &lt;p&gt;This paragraph &lt;emp&gt;replaces&lt;/emp&gt; the first paragraph.&lt;/p&gt;
       &lt;/source:fragment&gt;
     &lt;/source:insert&gt;
     ...
   &lt;/page&gt;
  						
  					</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  				
  </font>
  </p>
  			
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Insert at the beginning</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  						
   &lt;page&gt;
     ...
     &lt;source:insert&gt;
       &lt;source:source&gt;context://doc/editable/my.xml&lt;/source:source&gt;
       &lt;source:path&gt;page&lt;/source:path&gt;
       &lt;source:replace&gt;content&lt;/source:replace&gt;
       &lt;source:reinsert&gt;content&lt;/source:reinsert&gt;
       &lt;source:fragment&gt;
         &lt;content&gt;
           &lt;p&gt;This new paragraph gets inserted &lt;emp&gt;before&lt;/emp&gt; the other ones.&lt;/p&gt;
         &lt;/content&gt;
       &lt;/source:fragment&gt;
      &lt;source:insert&gt;
     ...
   &lt;/page&gt;
  						
  					</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  					
  <p>
  <font color="black" face="verdana,helvetica,sanserif">This sample does not currently work, see the tests in the scratchpad at <code><font face="courier, monospaced">http://localhost:8080/cocoon/mount/editor/tests</font></code>.</font>
  </p>
  					
  <p>
  <table border="0" cellpadding="0" cellspacing="3" width="100%">
  <tr>
  <td valign="top" width="28"><img alt="Note" border="0" hspace="0" vspace="0" height="29" width="28" src="images/note.gif"></td><td valign="top"><font color="black" face="verdana,helvetica,sanserif" size="-1"><i>You must have built Cocoon with the scratchpad included for this link to work.</i></font></td>
  </tr>
  </table>
  </p>
  				
  </font>
  </p>
  			
  			
  <font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sample of the output of these tags</b></font>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">This is the kind of information that the <code><font face="courier, monospaced">SourceWritingTransformer</font></code> outputs to the pipeline, replacing the original <code><font face="courier, monospaced">source:write</font></code> and <code><font face="courier, monospaced">source:insert</font></code> tags</font>
  </p>
  				
  <p>
  <font color="black" face="verdana,helvetica,sanserif">
  					
  <div align="center">
  <table border="0" cellpadding="0" cellspacing="4">
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
  <pre>
  						
   &lt;page&gt;
     ...
     &lt;sourceResult&gt;
       &lt;action&gt;new|overwritten|none&lt;/action&gt;
       &lt;behaviour&gt;write|insert&lt;behaviour&gt;
       &lt;execution&gt;success|failure&lt;/execution&gt;
       &lt;serializer&gt;xml&lt;/serializer&gt;
       &lt;source&gt;source:specific/path/to/context/doc/editable/my.xml&lt;/source&gt;
       &lt;message&gt;a message about what happened&lt;/message&gt;
     &lt;/sourceResult&gt;
     ...
   &lt;/page&gt;
  						
  					</pre>
  </td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  <tr>
  <td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
  </tr>
  </table>
  </div>
  				
  </font>
  </p>
  			
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Known Problems</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">Namespace handling: namespace declarations are not copied to the <code><font face="courier, monospaced">Source</font></code>, resulting in invalid XML.</font>
  </p>
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">I cannot get the 'insert before' example working, which uses the <code><font face="courier, monospaced">&lt;source:reinsert/&gt;</font></code> tag.</font>
  </p>
  		
  		
  <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Warning</font>
  <hr style="color: #0086b2" size="1">
  			
  <p>
  <font color="black" face="verdana,helvetica,sanserif">It is not known how robust this transformer is under even moderate load, especially when it comes to more than one person modifying the same file at the same time.</font>
  </p>
  		
  	
  
  </td>
  </tr>
  </table>
  </td>
  </tr>
  </table>
  <table width="100%" cellspacing="0" cellpadding="0" border="0">
  <tr>
  <td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
  </tr>
  <tr>
  <td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
  </tr>
  </table>
  </body>
  </html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: general-cvs-help@xml.apache.org


Mime
View raw message