cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coli...@apache.org
Subject cvs commit: cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/templates IncludeTop.vm
Date Thu, 27 Mar 2003 18:59:24 GMT
coliver     2003/03/27 10:59:24

  Modified:    src/scratchpad/src/org/apache/cocoon/transformation
                        JXPathTransformer.java
               src/scratchpad/webapp/samples/petstore sitemap.xmap
               src/scratchpad/webapp/samples/petstore/flow petstore.js
               src/scratchpad/webapp/samples/petstore/stylesheets
                        site2html.xsl
               src/scratchpad/webapp/samples/petstore/view/templates
                        IncludeTop.vm
  Added:       src/scratchpad/lib commons-jexl-1.0-beta-1.jar
                        velocity-1.4-dev-20030301.jar
               src/scratchpad/webapp/samples/petstore/view/jexl Cart.xml
                        Category.xml Checkout.xml ConfirmOrder.xml Item.xml
                        NewAccountForm.xml NewOrderForm.xml Product.xml
                        SearchProducts.xml ShippingForm.xml SignonForm.xml
                        ViewOrder.xml index.xml
               src/scratchpad/webapp/samples/petstore/view/jxpath Cart.xml
                        Category.xml Checkout.xml ConfirmOrder.xml Item.xml
                        NewAccountForm.xml NewOrderForm.xml Product.xml
                        SearchProducts.xml ShippingForm.xml SignonForm.xml
                        ViewOrder.xml index.xml
  Log:
  added examples of JXPath and Jexl views to petstore
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/scratchpad/lib/commons-jexl-1.0-beta-1.jar
  
  	<<Binary file>>
  
  
  1.1                  cocoon-2.1/src/scratchpad/lib/velocity-1.4-dev-20030301.jar
  
  	<<Binary file>>
  
  
  1.2       +82 -12    cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation/JXPathTransformer.java
  
  Index: JXPathTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/transformation/JXPathTransformer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JXPathTransformer.java	26 Mar 2003 05:28:08 -0000	1.1
  +++ JXPathTransformer.java	27 Mar 2003 18:59:22 -0000	1.2
  @@ -52,6 +52,7 @@
   
   import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.cocoon.generation.Generator;
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.components.flow.WebContinuation;
   import org.apache.cocoon.environment.Environment;
  @@ -59,12 +60,17 @@
   import org.apache.commons.jxpath.JXPathContext;
   import org.apache.commons.jxpath.Variables;
   import org.apache.commons.jxpath.Pointer;
  +
   import org.xml.sax.Attributes;
   import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   import org.apache.cocoon.xml.dom.DOMStreamer;
   import org.w3c.dom.DocumentFragment;
   import org.apache.avalon.framework.CascadingRuntimeException;
  +import org.apache.cocoon.components.source.SourceUtil;
  +import org.apache.excalibur.source.Source;
  +import org.apache.excalibur.source.SourceException;
  +import org.apache.excalibur.source.SourceValidity;
   
   import java.io.IOException;
   import java.io.Reader;
  @@ -76,7 +82,7 @@
   import java.util.Stack;
   import java.util.Iterator;
   /**
  - * JXPath Transformer.
  + * JXPath Transformer
    *
    * <p>
    *  Transformer implementation using Apache JXPath
  @@ -91,7 +97,7 @@
    * @author <a href="mailto:coliver@apache.org">Christopher Oliver</a>
    */
   public class JXPathTransformer
  -extends AbstractSAXTransformer implements Initializable {
  +extends AbstractSAXTransformer implements Initializable, Generator {
   
       public static final String JXPATH_NAMESPACE_URI  = 
   	"http://cocoon.apache.org/transformation/jxpath/1.0";
  @@ -140,6 +146,31 @@
       private Stack ifStack;
   
   
  +    // Run as a generator for debugging: to get line numbers in error messages
  +
  +    private Source inputSource;
  +
  +    public void generate()
  +        throws IOException, SAXException, ProcessingException {
  +	try {
  +            this.resolver.toSAX(this.inputSource, this);
  +        } catch (SAXException e) {
  +            final Exception cause = e.getException();
  +            if( cause != null ) {
  +                if ( cause instanceof ProcessingException )
  +                    throw (ProcessingException)cause;
  +                if ( cause instanceof IOException )
  +                    throw (IOException)cause;
  +                if ( cause instanceof SAXException )
  +                    throw (SAXException)cause;
  +                throw new ProcessingException("Could not read resource "
  +                                              + this.inputSource.getURI(), cause);
  +            }
  +            throw e;
  +        }
  +    }
  +
  +
       /**
        * Initialize this transformer.
        *
  @@ -166,7 +197,13 @@
           throws ProcessingException, SAXException, IOException {
   
           super.setup(resolver, objectModel, src, parameters);
  -
  +	if (src != null) {
  +	    try {
  +		this.inputSource = resolver.resolveURI(src);
  +	    } catch (SourceException se) {
  +		throw SourceUtil.handle("Error during resolving of '" + src + "'.", se);
  +	    }
  +	}
           // setup the jxpath transformer for this thread
           // FIX ME: When we decide proper way to pass "bean" and "kont"
           Object bean = ((Environment)resolver).getAttribute("bean-dict");
  @@ -180,6 +217,42 @@
       }
   
       /**
  +     * Hack? Accept JXPath expr with or without enclosing {}
  +     */
  +
  +    String getExpr(String inStr) {
  +        try {
  +	    inStr = inStr.trim();
  +	    if (inStr.length() == 0 || inStr.charAt(0) != '{') {
  +		return inStr;
  +	    }
  +            StringReader in = new StringReader(inStr);
  +            int ch;
  +            StringBuffer expr = new StringBuffer();
  +	    in.read(); // '{'
  +            while ((ch = in.read()) != -1) {
  +                char c = (char)ch;
  +		if (c == '}') {
  +		    break;
  +		} else if (c == '\\') {
  +		    ch = in.read();
  +		    if (ch == -1) {
  +			expr.append('\\');
  +		    } else {
  +			expr.append((char)ch);
  +		    }
  +		} else {
  +		    expr.append(c);
  +		}
  +	    } 
  +	    return expr.toString();
  +        } catch (IOException ignored) {
  +            ignored.printStackTrace();
  +        }
  +	return inStr;
  +    }
  +
  +    /**
        * Substitute the values of XPath expr's (contained in {}) within attribute values
        * TBD: how should escaping of {} be done? (uses backslash at the moment)
        */
  @@ -247,8 +320,7 @@
                       try {
                           substitute(reader, writer);
                       } catch (Exception exc) {
  -                        throw new CascadingRuntimeException(exc.getMessage(),
  -                                                            exc);
  +                        throw new SAXException(exc.getMessage(), exc);
                       }
                       impl.setValue(i, writer.toString());
                   }
  @@ -338,17 +410,15 @@
                   finishIf();
               } else if (JXPATH_CHOOSE.equals(name)) {
                   finishChoose();
  +                inChoose = false;
               } else if (JXPATH_WHEN.equals(name)) {
                   finishWhen();
                   inChoose = true;
  -                return;
               } else if (JXPATH_OTHERWISE.equals(name)) {
                   finishOtherwise();
                   inChoose = true;
  -                return;
               }
           }
  -        inChoose = false;
       }
   
       private JXPathContext getContext() {
  @@ -415,7 +485,7 @@
           final String select = a.getValue(JXPATH_VALUEOF_SELECT);
   
           if (null != select) {
  -            Object value = getValue(select);
  +            Object value = getValue(getExpr(select));
               if (value == null) {
                   value = "";
               }
  @@ -466,7 +536,7 @@
           String test = a.getValue(JXPATH_IF_TEST);
   
           final Object value = 
  -            (test == null) ? Boolean.FALSE : getValue("boolean("+test+")");
  +            (test == null) ? Boolean.FALSE : getValue("boolean("+getExpr(test)+")");
           final boolean isTrueBoolean =
               value instanceof Boolean && ((Boolean)value).booleanValue() == true;
           ifStack.push(isTrueBoolean ? Boolean.TRUE : Boolean.FALSE);
  @@ -496,7 +566,7 @@
           if (ignoreEventsCount == 0) {
               startRecording();
               // get the test variable
  -            String variable = a.getValue(JXPATH_VALUEOF_SELECT);
  +            String variable = getExpr(a.getValue(JXPATH_VALUEOF_SELECT));
               Iterator iter = 
                   JXPathContext.compile(variable).iteratePointers(getContext());
               foreachStack.push(variable);
  @@ -539,7 +609,7 @@
           // get the test variable
           String test = a.getValue(JXPATH_WHEN_TEST);
           final Object value = 
  -            (test == null) ? Boolean.FALSE : getValue("boolean("+test+")");
  +            (test == null) ? Boolean.FALSE : getValue("boolean("+getExpr(test)+")");
           final boolean isTrueBoolean =
               value instanceof Boolean && ((Boolean)value).booleanValue() == true;
           if (isTrueBoolean) {
  
  
  
  1.11      +16 -2     cocoon-2.1/src/scratchpad/webapp/samples/petstore/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/sitemap.xmap,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- sitemap.xmap	25 Mar 2003 20:55:09 -0000	1.10
  +++ sitemap.xmap	27 Mar 2003 18:59:22 -0000	1.11
  @@ -5,9 +5,11 @@
     <map:components> 
       <map:transformers default="xslt">
         <map:transformer name="xmlform" src="org.apache.cocoon.transformation.XMLFormTransformer" logger="xmlform.sitemap.transformer"/>
  +      <map:transformer name="jxpath" src="org.apache.cocoon.transformation.JXPathTransformer" logger="jxpath.sitemap.transformer"/>
  +      <map:transformer name="jexl" src="org.apache.cocoon.transformation.JexlTransformer" logger="jexl.sitemap.transformer"/>
       </map:transformers>
       <map:generators default="file">
  -        <map:generator label="content,data" logger="sitemap.generator.flow_velocity" name="flow_velocity" src="org.apache.cocoon.generation.FlowVelocityGenerator"/>
  +        <map:generator label="content,data" logger="sitemap.generator.velocity" name="velocity" src="org.apache.cocoon.generation.FlowVelocityGenerator"/>
       </map:generators>
       <map:flow-interpreters default="JavaScript"/>
       <map:serializers default="html"/>
  @@ -104,8 +106,20 @@
           <map:transform src="stylesheets/site2html.xsl" />
           <map:serialize type="html"/>
        </map:match>
  +     <map:match pattern="view/*.jxpath">
  +        <map:generate src="view/jxpath/{1}.xml" type="file" />
  +        <map:transform type="jxpath" />
  +        <map:transform src="stylesheets/site2html.xsl" />
  +        <map:serialize type="html"/>
  +     </map:match>
  +     <map:match pattern="view/*.jexl">
  +        <map:generate src="view/jexl/{1}.xml" type="file" />
  +        <map:transform type="jexl" />
  +        <map:transform src="stylesheets/site2html.xsl" />
  +        <map:serialize type="html"/>
  +     </map:match>
        <map:match pattern="view/*.vm">
  -      <map:generate src="view/templates/{1}.vm" type="flow_velocity"/>
  +      <map:generate src="view/templates/{1}.vm" type="velocity"/>
         <map:serialize type="html"/>
        </map:match>
      </map:pipeline>
  
  
  
  1.10      +4 -0      cocoon-2.1/src/scratchpad/webapp/samples/petstore/flow/petstore.js
  
  Index: petstore.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/flow/petstore.js,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- petstore.js	25 Mar 2003 20:55:09 -0000	1.9
  +++ petstore.js	27 Mar 2003 18:59:22 -0000	1.10
  @@ -102,6 +102,10 @@
           EXT = ".vm";
       } else if (VIEW == "Xsp") {
           EXT = ".xsp";
  +    } else if (VIEW == "Jexl") {
  +        EXT = ".jexl";
  +    } else if (VIEW == "JXPath") {
  +        EXT = ".jxpath";
       }
       print("EXT="+EXT);
   }
  
  
  
  1.7       +19 -1     cocoon-2.1/src/scratchpad/webapp/samples/petstore/stylesheets/site2html.xsl
  
  Index: site2html.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/stylesheets/site2html.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- site2html.xsl	25 Mar 2003 20:55:09 -0000	1.6
  +++ site2html.xsl	27 Mar 2003 18:59:22 -0000	1.7
  @@ -21,9 +21,27 @@
   							<td>
   							   <form method="post" action="index.do">
   								 <input type="image" border="0" src="images/logo-topbar.gif" />
  -								   <select name="view" width="14" align="left" value="Xsp" onChange="document.forms[0].submit()">
  +								   <select name="view" width="14" align="left" onChange="document.forms[0].submit()">
  +								<xsl:choose>
  +									<xsl:when test="@view='jxpath'">
  +									  <option value="JXPath">JXPath</option>
  +									  <option value="Jexl">Jexl</option>
   									  <option value="Xsp">Xsp</option>
   									  <option value="Velocity">Velocity</option>
  +                                                                        </xsl:when>
  +									<xsl:when test="@view='jexl'">
  +									  <option value="Jexl">Jexl</option>
  +									  <option value="JXPath">JXPath</option>
  +									  <option value="Xsp">Xsp</option>
  +									  <option value="Velocity">Velocity</option>
  +                                                                        </xsl:when>
  +									<xsl:otherwise>
  +									  <option value="Xsp">Xsp</option>
  +									  <option value="JXPath">JXPath</option>
  +									  <option value="Jexl">Jexl</option>
  +									  <option value="Velocity">Velocity</option>
  +									</xsl:otherwise>
  +							              </xsl:choose>
   								   </select>
   							   </form>
   							</td>
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/Cart.xml
  
  Index: Cart.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <cart name="Shopping Cart" >
              <backpointer name="Main Menu" do="index.do" />
              <jexl:forEach var="cartItem" items="${cartItems}" >
                  <item productId="${cartItem.item.productId}" id="${cartItem.item.itemId}"> 
                      <desc>
                          <jexl:out value="${cartItem.item.attr1}"/> 
                          <jexl:out value="${cartItem.item.attr2}"/> 
                          <jexl:out value="${cartItem.item.attr3}"/> 
                          <jexl:out value="${cartItem.item.attr4}"/> 
                          <jexl:out value="${cartItem.item.attr5}"/> 
                          <jexl:out value="${cartItem.item.product.name}"/> 
                      </desc>
                      <price><jexl:out value="${cartItem.item.listPrice}"/></price>
                      <quantity><jexl:out value="${cartItem.quantity}"/></quantity>
                  </item>
              </jexl:forEach>
              <total><jexl:out value="${cartForm.cart.subTotal}"/></total>
              <nextpointer do="checkout.do" img="images/button_checkout.gif" />
          </cart>
      </site>
  </page>
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/Category.xml
  
  Index: Category.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <category name="${category.name}">
              <jexl:forEach var="prod" items="${productList}" >
                  <product name="${prod.name}" id="${prod.productId}"/>
              </jexl:forEach>
              <situation firstPage="${firstPage}" lastPage="${lastPage}" continuation="${continuation.id}"/>
          </category>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/Checkout.xml
  
  Index: Checkout.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm/signOn}" view="jexl">
          <cart name="Checkout Summary">
              <backpointer name="Shopping Cart" do="viewCart.do" />
              <jexl:forEach var="cartItem" items="${cartItems}" >
                  <item product-id="${cartItem.item.productId}" id="${cartItem.item.itemId}">
                      <desc>
                          <jexl:out value="${cartItem.item.attr1}"/> 
                          <jexl:out value="${cartItem.item.attr2}"/> 
                          <jexl:out value="${cartItem.item.attr3}"/> 
                          <jexl:out value="${cartItem.item.attr4}"/> 
                          <jexl:out value="${cartItem.item.attr5}"/> 
                          <jexl:out value="${cartItem.item.product.name}"/> 
                      </desc>
                      <price><jexl:out value="${cartItem.item.listPrice}"/></price>
                      <quantity><jexl:out value="${cartItem.quantity}"/></quantity>
                  </item>
              </jexl:forEach>
              <total><jexl:out value="${cartForm.cart.subTotal}"/></total>
              <nextpointer img="images/button_continue.gif" do="${continuation.id}.kont"/>
          </cart>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/ConfirmOrder.xml
  
  Index: ConfirmOrder.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <backpointer name="Main Menu" do="index.do" />
          <message>Please confirm the information below and then press continue...</message>
          <panel header="Order #${order.orderId}" subheader="${order.orderDate}">
              <panel label="Payment Details">
                  <field label="Card Type"><jexl:out value="${order.cardType}" /></field>
                  <field label="Card Number"><jexl:out value="${order.creditCard}" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jexl:out value="${order.expiryDate}" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jexl:out value="${order.billToFirstName}}"/></field>
                  <field label="Last name" ><jexl:out value="${order.billToLastName}"/></field>
                  <field label="Address 1" ><jexl:out value="${order.billAddress1}"/></field>
                  <field label="Address 2" ><jexl:out value="${order.billAddress2}"/></field>
                  <field label="City" ><jexl:out value="${order.billCity}"/></field>
                  <field label="State" ><jexl:out value="${order.billState}"/></field>
                  <field label="Zip" ><jexl:out value="${order.billZip}"/></field>
                  <field label="Country" ><jexl:out value="${order.billCountry}"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jexl:out value="${order.shipToFirstName}"/></field>
                  <field label="Last name" ><jexl:out value="${order.shipToLastName}"/></field>
                  <field label="Address 1" ><jexl:out value="${order.shipAddress1}"/></field>
                  <field label="Address 2" ><jexl:out value="${order.shipAddress2}"/></field>
                  <field label="City" ><jexl:out value="${order.shipCity}"/></field>
                  <field label="State" ><jexl:out value="${order.shipState}"/></field>
                  <field label="Zip" ><jexl:out value="${order.shipZip}"/></field>
                  <field label="Country" ><jexl:out value="${order.shipCountry}"/></field>
              </panel>
          </panel>
          <nextpointer img="images/button_continue.gif" do="${continuation.id}.kont?confirmed=true}"/>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/Item.xml
  
  Index: Item.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <backpointer name="${product.name}" do="viewProduct.do?productId=${product.productId}"/>
          <item id="${item.itemId}">
              <product-desc><jexl:out value="${product.descn}"/></product-desc>
              <product-name><jexl:out value="${product.name}"/></product-name>
              <desc>
                  <jexl:out value="${item.attr1}"/> 
                  <jexl:out value="${item.attr2}"/> 
                  <jexl:out value="${item.attr3}"/> 
                  <jexl:out value="${item.attr4}"/> 
                  <jexl:out value="${item.attr5}"/> 
                  <jexl:out value="${item.product.name}"/> 
              </desc>
              <instock><jexl:out value="${quantity}"/></instock>
              <price><jexl:out value="${item.listPrice}"/></price>
          </item>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/NewAccountForm.xml
  
  Index: NewAccountForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <form method="POST" styleId="workingAccountForm" action="${continuation.id}.kont">
  <!--
          <input type="hidden" name="validate" value="editAccount" />
          <input type="hidden"  name="account.username" /> -->
              <panel label="User Information">
                  <input name="workingAccountForm.account.username" label="User ID" />
                  <input type="password" name="workingAccountForm.account.password" label="New password" />
                  <input type="password" name="workingAccountForm.repeatedPassword" label="Repeat password" />
              </panel>
              
              <panel label="Account Information">
                  <input type="text" label="First name"/>
                  <input type="text" label="Last name" />
                  <input type="text" size="40" name="workingAccountForm.email" label="Email" />
                  <input type="text" name="workingAccountForm.phone" label="Phone" />
                  <input type="text" size="40" name="workingAccountForm.address1" label="Address 1" />
                  <input type="text" size="40" name="workingAccountForm.address2" label="Address 2" />
                  <input type="text" name="workingAccountForm.city" label="City" />
                  <input type="text" name="workingAccountForm.state" label="State" />
                  <input type="text" name="workingAccountForm.zip" label="Zip" />
                  <input type="text" size="15" name="workingAccountForm.country" label="Country" />
              </panel>
              
              <panel label="Profile Information">
                  <select name="workingAccountForm.languagePreference" label="Language Preference">
                      <option value="English">English</option>
                      <option value="Japanese">Japanese</option>
                  </select>
                  <select name="workingAccountForm.account.favouriteCategoryId" label="Favourite Category">
                      <jexl:forEach var="item" items="${categoryList}" >
                          <option value="${item.name}"><jexl:out value="${item.name}" /></option>
                      </jexl:forEach>
                  </select>
                  <input type="checkbox" name="workingAccountForm.account.listOption" label="Enable MyList"/> 
                  <input type="checkbox" name="workingAccountForm.account.bannerOption" label="Enable MyBanner"/>
              </panel>
              
          </form>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/NewOrderForm.xml
  
  Index: NewOrderForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <form method="POST" styleId="workingOrderForm" action="${continuation.id}.kont">
          <panel>
              <panel label="Payment Details">
                  <select name="order.cardType" label="Card Type">
                      <jexl:forEach var="card" items="${creditCardTypes}" >
                          <option value="${card}"><jexl:out value="${card}" /></option>
                      </jexl:forEach>
                  </select>
                  <input type="text" name="creditCard" label="Card Number" />
                  <input type="text" name="expiryDate" label="Expiry Date (MM/YYYY)" />
              </panel>
              <panel label="Billing Address">
                  <input type="text" name="billToFirstName" label="First name" value="${order.billToFirstName}"/>
                  <input type="text" name="billToLastName" label="Last name" value="${order.billToLastName}"/>
                  <input type="text" size="40" name="billAddress1"  label="Address 1" value="${order.billAddress}"/>
                  <input type="text" size="40" name="billAddress2" label="Address 2" value="${order.billAddress2}"/>
                  <input type="text" name="billCity" label="City" value="${order.billCity}"/>
                  <input type="text" name="billState" label="State" value="${order.billState}"/>
                  <input type="text" name="billZip" label="Zip" value="${order.billZip}"/>
                  <input type="text" size="15" name="billCountry" label="Country" value="${order.billCountry}"/>
                  <input type="checkbox" name="shippingAddressRequired" label="Ship to different address..."/>
              </panel>
          </panel>
          </form>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/Product.xml
  
  Index: Product.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <backpointer name="${product.category}" do="viewCategory.do?categoryId=${product.category}"/>
          <product name="${product.name}">
              <jexl:forEach var="item" items="${itemList}" >
                  <item productId="${item.productId}" id="${item.itemId}">
                      <desc>
                          <jexl:out value="${item.attr1}"/> 
                          <jexl:out value="${item.attr2}"/> 
                          <jexl:out value="${item.attr3}"/> 
                          <jexl:out value="${item.attr4}"/> 
                          <jexl:out value="${item.attr5}"/> 
                      </desc>
                      <price><jexl:out value="${item.listPrice}"/></price>
                  </item>
              </jexl:forEach>
              <situation firstPage="${firstPage}" lastPage="${lastPage}" continuation="${continuation.id}"/>
          </product>
      </site>
  
  </page>
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/SearchProducts.xml
  
  Index: SearchProducts.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm/signOn}" view="jexl">
          <backpointer name="Main Menu" do="index.do" />
          <search>
              <jexl:forEach var="item" items="${searchResultsProductList}" >
                  <product name="${item.name} id="${item.productId}">
                      <product-desc><jexl:out value="${descn}"/></product-desc>
                  </product>
              </jexl:forEach>
              <situation firstPage="${firstPage}" lastPage="${lastPage}" continuation="${continuation.id}"/>
          </search>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/ShippingForm.xml
  
  Index: ShippingForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm/signOn}" view="jexl">
          <backpointer name="Main Menu" do="index.do" />
          <form method="POST" styleId="workingOrderForm" action="${continuation.id}.kont">
          <panel>
              <panel label="Shipping Address">
                  <input type="text" name="shipToFirstName" label="First name" />
                  <input type="text" name="shipToLastName" label="Last name" />
                  <input type="text" name="shipAddress1" size="40" label="Address 1" />
                  <input type="text" name="shipAddress2" size="40" label="Address 2" />
                  <input type="text" name="shipCity" label="City" />
                  <input type="text" name="shipState" label="State" />
                  <input type="text" name="shipZip" label="Zip" />
                  <input type="text" name="shipCountry" size="15" label="Country" />
              </panel>
          </panel>
          </form>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/SignonForm.xml
  
  Index: SignonForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="{accountForm/signOn}" view="jexl">
          <form method="POST" label="signon" action="${continuation.id}.kont">
              <message type="warning"><jexl:out value="${message}"/></message>
              <input type="text" name="username" value="j2ee" label="Username" />
              <input type="password" name="password" value="j2ee" label="Password" />
              <input type="image" src="images/button_submit.gif" name="update" />
          </form>
          <register/>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/ViewOrder.xml
  
  Index: ViewOrder.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
          <backpointer name="Main Menu" do="index.do" />
          <message></message>
          <panel header="Order #${order.orderId}" subheader="${order.orderDate}">
              <panel label="Payment Details">
                  <field label="Card Type"><jexl:out value="${order.cardType}" /></field>
                  <field label="Card Number"><jexl:out value="${order.creditCard}" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jexl:out value="${order.expiryDate}" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jexl:out value="${order.billToFirstName}"/></field>
                  <field label="Last name" ><jexl:out value="${order.billToLastName}"/></field>
                  <field label="Address 1" ><jexl:out value="${order.billAddress1}"/></field>
                  <field label="Address 2" ><jexl:out value="${order.billAddress2}"/></field>
                  <field label="City" ><jexl:out value="${order.billCity}"/></field>
                  <field label="State" ><jexl:out value="${order.billState}"/></field>
                  <field label="Zip" ><jexl:out value="${order.billZip}"/></field>
                  <field label="Country" ><jexl:out value="${order.billCountry}"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jexl:out value="${order.shipToFirstName}"/></field>
                  <field label="Last name" ><jexl:out value="${order.shipToLastName}"/></field>
                  <field label="Address 1" ><jexl:out value="${order.shipAddress1}"/></field>
                  <field label="Address 2" ><jexl:out value="${order.shipAddress2}"/></field>
                  <field label="City" ><jexl:out value="${order.shipCity}"/></field>
                  <field label="State" ><jexl:out value="${order.shipState}"/></field>
                  <field label="Zip" ><jexl:out value="${order.shipZip}"/></field>
                  <field label="Country" ><jexl:out value="${order.shipCountry}"/></field>
                  <field label="Courier" ><jexl:out value="${order.courier}"/></field>
              </panel>
              <panel label="Status">
                  <field empty="2">
                      <cart name="Status">
                          <jexl:forEach var ="cartItem" items="${itemList}" >
                              <item product-id="${cartItem.item.productId}" id="${cartItem.item.itemId}">
                                  <desc>
                                      <jexl:out value="${cartItem.item.attr1}"/> 
                                      <jexl:out value="${cartItem.item.attr2}"/> 
                                      <jexl:out value="${cartItem.item.attr3}"/> 
                                      <jexl:out value="${cartItem.item.attr4}"/> 
                                      <jexl:out value="${cartItem.item.attr5}"/> 
                                      <jexl:out value="${cartItem.item.product.name}"/> 
                                  </desc>
                                  <price><jexl:out value="${cartItem.listPrice}"/></price>
                                  <quantity><jexl:out value="${cartItem.quantity}"/></quantity>
                              </item>
                          </jexl:forEach>
                          <total><jexl:out value="${order.totalPrice}"/></total>
                      </cart>
                  </field>
              </panel>
              
              
          </panel>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jexl/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jexl="http://cocoon.apache.org/transformation/jexl/1.0">
      <site signOn="${accountForm.signOn}" view="jexl">
              <welcome>
                  <jexl:if test="${!accountForm.signOn}">
                      <firstName><jexl:out value="${accountForm.account.firstName}"/></firstName>
                  </jexl:if>
                  <menu>
                      <jexl:forEach var="item" items="${categoryList}" >
                          <category name="${item.name}" id="${item.catId}"/>
                      </jexl:forEach>
                  </menu>
              </welcome>
      </site>
  </page>
  
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/Cart.xml
  
  Index: Cart.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <cart name="Shopping Cart" >
              <backpointer name="Main Menu" do="index.do" />
              <jxpath:for-each select="{cartItems}" >
                  <item productId="{item/productId}" id="{item/itemid}"> 
                      <desc>
                          <jxpath:value-of select="item/attr1"/> 
                          <jxpath:value-of select="item/attr2"/> 
                          <jxpath:value-of select="item/attr3"/> 
                          <jxpath:value-of select="item/attr4"/> 
                          <jxpath:value-of select="item/attr5"/> 
                          <jxpath:value-of select="item/product/name"/> 
                      </desc>
                      <price><jxpath:value-of select="{item/listPrice}"/></price>
                      <quantity><jxpath:value-of select="{quantity}"/></quantity>
                  </item>
              </jxpath:for-each>
              <total><jxpath:value-of select="{cartForm/cart/subTotal}"/></total>
              <nextpointer do="checkout.do" img="images/button_checkout.gif" />
          </cart>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/Category.xml
  
  Index: Category.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <category name="{category/name}">
              <jxpath:for-each select="productList" >
                  <product name="{name}" id="{productId}"/>
              </jxpath:for-each>
              <situation firstPage="{firstPage}" lastPage="{lastPage}" continuation="{$continuation/id}"/>
          </category>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/Checkout.xml
  
  Index: Checkout.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <cart name="Checkout Summary">
              <backpointer name="Shopping Cart" do="viewCart.do" />
              <jxpath:for-each select="cartItems" >
                  <item product-id="{item/productId}" id="{item/itemId}">
                      <desc>
                          <jxpath:value-of select="item/attr1"/> 
                          <jxpath:value-of select="item/attr2"/> 
                          <jxpath:value-of select="item/attr3"/> 
                          <jxpath:value-of select="item/attr4"/> 
                          <jxpath:value-of select="item/attr5"/> 
                          <jxpath:value-of select="item/product/name"/> 
                      </desc>
                      <price><jxpath:value-of select="item/listPrice"/></price>
                      <quantity><jxpath:value-of select="quantity"/></quantity>
                  </item>
              </jxpath:for-each>
              <total><jxpath:value-of select="cartForm/cart/subTotal"/></total>
              <nextpointer img="images/button_continue.gif" do="{$continuation/id}.kont"/>
          </cart>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/ConfirmOrder.xml
  
  Index: ConfirmOrder.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <message>Please confirm the information below and then press continue...</message>
          <panel header="Order #{order/orderId}" subheader="{order/orderDate}">
              <panel label="Payment Details">
                  <field label="Card Type"><jxpath:value-of select="order/cardType" /></field>
                  <field label="Card Number"><jxpath:value-of select="order/creditCard" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jxpath:value-of select="order/expiryDate" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jxpath:value-of select="order/billToFirstName"/></field>
                  <field label="Last name" ><jxpath:value-of select="order/billToLastName"/></field>
                  <field label="Address 1" ><jxpath:value-of select="order/billAddress1"/></field>
                  <field label="Address 2" ><jxpath:value-of select="order/billAddress2"/></field>
                  <field label="City" ><jxpath:value-of select="order/billCity"/></field>
                  <field label="State" ><jxpath:value-of select="order/billState"/></field>
                  <field label="Zip" ><jxpath:value-of select="order/billZip"/></field>
                  <field label="Country" ><jxpath:value-of select="order/billCountry"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jxpath:value-of select="order/shipToFirstName"/></field>
                  <field label="Last name" ><jxpath:value-of select="order/shipToLastName"/></field>
                  <field label="Address 1" ><jxpath:value-of select="order/shipAddress1"/></field>
                  <field label="Address 2" ><jxpath:value-of select="order/shipAddress2"/></field>
                  <field label="City" ><jxpath:value-of select="order/shipCity"/></field>
                  <field label="State" ><jxpath:value-of select="order/shipState"/></field>
                  <field label="Zip" ><jxpath:value-of select="order/shipZip"/></field>
                  <field label="Country" ><jxpath:value-of select="order/shipCountry"/></field>
              </panel>
          </panel>
          <nextpointer img="images/button_continue.gif" do="{$continuation/id}.kont?confirmed=true"/>
      </site>
  
  </xsp:page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/Item.xml
  
  Index: Item.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="{product/name}" do="viewProduct.do?productId={product/productId}"/>
          <item id="{item/itemId}">
              <product-desc><jxpath:value-of select="product/descn"/></product-desc>
              <product-name><jxpath:value-of select="product/name"/></product-name>
              <desc>
                  <jxpath:value-of select="item/attr1"/> 
                  <jxpath:value-of select="item/attr2"/> 
                  <jxpath:value-of select="item/attr3"/> 
                  <jxpath:value-of select="item/attr4"/> 
                  <jxpath:value-of select="item/attr5"/> 
                  <jxpath:value-of select="item/product/name"/> 
              </desc>
              <instock><jxpath:value-of select="quantity"/></instock>
              <price><jxpath:value-of select="item/listPrice"/></price>
          </item>
  
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/NewAccountForm.xml
  
  Index: NewAccountForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <form method="POST" styleId="workingAccountForm" action="{$continuation/id}.kont">
  <!--
          <input type="hidden" name="validate" value="editAccount" />
          <input type="hidden"  name="account.username" /> -->
              <panel label="User Information">
                  <input name="workingAccountForm.account.username" label="User ID" />
                  <input type="password" name="workingAccountForm.account.password" label="New password" />
                  <input type="password" name="workingAccountForm.repeatedPassword" label="Repeat password" />
              </panel>
              
              <panel label="Account Information">
                  <input type="text" label="First name"/>
                  <input type="text" label="Last name" />
                  <input type="text" size="40" name="workingAccountForm.email" label="Email" />
                  <input type="text" name="workingAccountForm.phone" label="Phone" />
                  <input type="text" size="40" name="workingAccountForm.address1" label="Address 1" />
                  <input type="text" size="40" name="workingAccountForm.address2" label="Address 2" />
                  <input type="text" name="workingAccountForm.city" label="City" />
                  <input type="text" name="workingAccountForm.state" label="State" />
                  <input type="text" name="workingAccountForm.zip" label="Zip" />
                  <input type="text" size="15" name="workingAccountForm.country" label="Country" />
              </panel>
              
              <panel label="Profile Information">
                  <select name="workingAccountForm.languagePreference" label="Language Preference">
                      <option value="English">English</option>
                      <option value="Japanese">Japanese</option>
                  </select>
                  <select name="workingAccountForm.account.favouriteCategoryId" label="Favourite Category">
                      <jxpath:for-each select="categoryList" >
                          <option value="{name}"><jxpath:value-of select="name" /></option>
                      </jxpath:for-each>
                  </select>
                  <input type="checkbox" name="workingAccountForm.account.listOption" label="Enable MyList"/> 
                  <input type="checkbox" name="workingAccountForm.account.bannerOption" label="Enable MyBanner"/>
              </panel>
              
          </form>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/NewOrderForm.xml
  
  Index: NewOrderForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <form method="POST" styleId="workingOrderForm" action="{continuation/id}.kont">
          <panel>
              <panel label="Payment Details">
                  <select name="order.cardType" label="Card Type">
                      <jxpath:for-each select="creditCardTypes" >
                          <option value="{.}"><jxpath:value-of select="." /></option>
                      </jxpath:for-each>
                  </select>
                  <input type="text" name="creditCard" label="Card Number" />
                  <input type="text" name="expiryDate" label="Expiry Date (MM/YYYY)" />
              </panel>
              <panel label="Billing Address">
                  <input type="text" name="billToFirstName" label="First name" value="{order/billToFirstName}"/>
                  <input type="text" name="billToLastName" label="Last name" value="{order/billToLastName}"/>
                  <input type="text" size="40" name="billAddress1"  label="Address 1" value="{order/billAddress}"/>
                  <input type="text" size="40" name="billAddress2" label="Address 2" value="{order/billAddress2}"/>
                  <input type="text" name="billCity" label="City" value="{order/billCity}"/>
                  <input type="text" name="billState" label="State" value="{order/billState}"/>
                  <input type="text" name="billZip" label="Zip" value="{order/billZip}"/>
                  <input type="text" size="15" name="billCountry" label="Country" value="{order/billCountry}"/>
                  <input type="checkbox" name="shippingAddressRequired" label="Ship to different address..."/>
              </panel>
          </panel>
          </form>
      </site>
  
  </age>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/Product.xml
  
  Index: Product.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="{product/category}" do="viewCategory.do?categoryId={product/category}"/>
          <product name="{product/name}">
              <jxpath:for-each select="itemList" >
                  <item productId="{productId}" id="{itemId}">
                      <desc>
                          <jxpath:value-of select="attr1"/> 
                          <jxpath:value-of select="attr2"/> 
                          <jxpath:value-of select="attr3"/> 
                          <jxpath:value-of select="attr4"/> 
                          <jxpath:value-of select="attr5"/> 
                      </desc>
                      <price><jxpath:value-of select="listPrice"/></price>
                  </item>
              </jxpath:for-each>
              <situation firstPage="{firstPage}" lastPage="{lastPage}" continuation="{$continuation/id}"/>
          </product>
      </site>
  
  </page>
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/SearchProducts.xml
  
  Index: SearchProducts.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <search>
              <jxpath:for-each select="searchResultsProductList" >
                  <product name="{name} id="{productId}">
                      <product-desc><jxpath:value-of select="descn"/></product-desc>
                  </product>
              </jxpath:for-each>
              <situation firstPage="{firstPage}" lastPage="{lastPage}" continuation="{$continuation/id}"/>
          </search>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/ShippingForm.xml
  
  Index: ShippingForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <form method="POST" styleId="workingOrderForm" action="{$continuation/id}.kont">
          <panel>
              <panel label="Shipping Address">
                  <input type="text" name="shipToFirstName" label="First name" />
                  <input type="text" name="shipToLastName" label="Last name" />
                  <input type="text" name="shipAddress1" size="40" label="Address 1" />
                  <input type="text" name="shipAddress2" size="40" label="Address 2" />
                  <input type="text" name="shipCity" label="City" />
                  <input type="text" name="shipState" label="State" />
                  <input type="text" name="shipZip" label="Zip" />
                  <input type="text" name="shipCountry" size="15" label="Country" />
              </panel>
          </panel>
          </form>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/SignonForm.xml
  
  Index: SignonForm.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <form method="POST" label="signon" action="{$continuation/id}.kont">
              <message type="warning"><jxpath:value-of select="//message"/></message>
              <input type="text" name="username" value="j2ee" label="Username" />
              <input type="password" name="password" value="j2ee" label="Password" />
              <input type="image" src="images/button_submit.gif" name="update" />
          </form>
          <register/>
      </site>
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/ViewOrder.xml
  
  Index: ViewOrder.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
          <backpointer name="Main Menu" do="index.do" />
          <message></message>
          <panel header="Order #{order/orderId}" subheader="{order/orderDate}">
              <panel label="Payment Details">
                  <field label="Card Type"><jxpath:value-of select="order/cardType" /></field>
                  <field label="Card Number"><jxpath:value-of select="order/creditCard" /></field>
                  <field label="Expiry Date (MM/YYYY)"><jxpath:value-of select="order/expiryDate" /></field>
              </panel>
              <panel label="Billing Address">
                  <field label="First name"><jxpath:value-of select="order/billToFirstName"/></field>
                  <field label="Last name" ><jxpath:value-of select="order/billToLastName"/></field>
                  <field label="Address 1" ><jxpath:value-of select="order/billAddress1"/></field>
                  <field label="Address 2" ><jxpath:value-of select="order/billAddress2"/></field>
                  <field label="City" ><jxpath:value-of select="order/billCity"/></field>
                  <field label="State" ><jxpath:value-of select="order/billState"/></field>
                  <field label="Zip" ><jxpath:value-of select="order/billZip"/></field>
                  <field label="Country" ><jxpath:value-of select="order/billCountry"/></field>
              </panel>
              <panel label="Shipping Address">
                  <field label="First name"><jxpath:value-of select="order/shipToFirstName"/></field>
                  <field label="Last name" ><jxpath:value-of select="order/shipToLastName"/></field>
                  <field label="Address 1" ><jxpath:value-of select="order/shipAddress1"/></field>
                  <field label="Address 2" ><jxpath:value-of select="order/shipAddress2"/></field>
                  <field label="City" ><jxpath:value-of select="order/shipCity"/></field>
                  <field label="State" ><jxpath:value-of select="order/shipState"/></field>
                  <field label="Zip" ><jxpath:value-of select="order/shipZip"/></field>
                  <field label="Country" ><jxpath:value-of select="order/shipCountry"/></field>
                  <field label="Courier" ><jxpath:value-of select="order/courier"/></field>
              </panel>
              <panel label="Status">
                  <field empty="2">
                      <cart name="Status">
                          <jxpath:for-each select="itemList" >
                              <item>
                                  <xsp:attribute name="product-id"><jxpath:value-of select="item/productId"/></xsp:attribute>
                                  <xsp:attribute name="id"><jxpath:value-of select="item/itemId"/></xsp:attribute>
                                  <desc>
                                      <jxpath:value-of select="item/attr1"/> 
                                      <jxpath:value-of select="item/attr2"/> 
                                      <jxpath:value-of select="item/attr3"/> 
                                      <jxpath:value-of select="item/attr4"/> 
                                      <jxpath:value-of select="item/attr5"/> 
                                      <jxpath:value-of select="item/product/name"/> 
                                  </desc>
                                  <price><jxpath:value-of select="item/listPrice"/></price>
                                  <quantity><jxpath:value-of select="quantity"/></quantity>
                              </item>
                          </jxpath:for-each>
                          <total><jxpath:value-of select="order/totalPrice"/></total>
                      </cart>
                  </field>
              </panel>
              
              
          </panel>
      </site>
  
  </page>
  
  
  
  
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/jxpath/index.xml
  
  Index: index.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <page xmlns:jxpath="http://cocoon.apache.org/transformation/jxpath/1.0">
      <site signOn="{accountForm/signOn}" view="jxpath">
              <welcome>
                  <jxpath:if test="not(accountForm/signOn)">
                      <firstName><jxpath:value-of select="accountForm/account/firstName"/></firstName>
                  </jxpath:if>
                  <menu>
                      <jxpath:for-each select="categoryList" >
                          <category name="{name}" id="{catId}"/>
                      </jxpath:for-each>
                  </menu>
              </welcome>
      </site>
  </page>
  
  
  
  
  
  
  
  
  1.5       +2 -0      cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/templates/IncludeTop.vm
  
  Index: IncludeTop.vm
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/webapp/samples/petstore/view/templates/IncludeTop.vm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IncludeTop.vm	25 Mar 2003 20:55:10 -0000	1.4
  +++ IncludeTop.vm	27 Mar 2003 18:59:24 -0000	1.5
  @@ -17,6 +17,8 @@
           <input type="image" border="0" src="images/logo-topbar.gif" />
           <select name="view" width="14" align="left" value="Velocity" onChange="document.forms[0].submit()">
             <option value="Velocity">Velocity</option>
  +          <option value="JXPath">JXPath</option>
  +          <option value="Jexl">Jexl</option>
             <option value="Xsp">Xsp</option>
           </select>
         </form>
  
  
  

Mime
View raw message