commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly build.xml
Date Wed, 19 Jun 2002 10:31:14 GMT
jstrachan    2002/06/19 03:31:14

  Modified:    jelly    build.xml
  Added:       jelly/src/test/org/apache/commons/jelly/xml/betwixt
                        makeBetwixt.jelly input.xml
  Log:
  added a new sample Jelly script to generate bewtixt descriptors from a sample XML bean language.
  Moving forward it mght be interesting to investigate using a simple 'BeanML' language to
autogenerate beans, Torque SQL stuff, OJB descriptors etc.
  
  Revision  Changes    Path
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/xml/betwixt/makeBetwixt.jelly
  
  Index: makeBetwixt.jelly
  ===================================================================
  <?xml version="1.0"?>
  <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml">
  
  <x:parse xml="${inputFile}" var="doc"/>
  <x:set var="rootElementName" select="string($doc/transactionBean/@rootName)"/>
  
  <info primitiveTypes="element">
    <element name="${rootElementName}">
      <x:forEach select="$doc/transactionBean/fields/field">
        <x:set var="fieldName" select="string(@name)"/>
        <x:set var="fieldType" select="string(@type)"/>
        <element name="${fieldName}" property="${fieldName}"/>
      </x:forEach>
    </element>
  </info>
  </j:jelly>
  
  
  
  1.1                  jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/xml/betwixt/input.xml
  
  Index: input.xml
  ===================================================================
  <?xml version="1.0"?>
  <transactionBean
    className="org.zenplex.tambora.transaction.PO"
    primitiveTypes="attributes"
    rootName="PO">
  
    <fields>
      <field name="id" type="int"/>
      <field name="name" type="String"/>
    </fields>
  </transactionBean>
  
  
  1.51      +8 -0      jakarta-commons-sandbox/jelly/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/build.xml,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- build.xml	18 Jun 2002 12:30:09 -0000	1.50
  +++ build.xml	19 Jun 2002 10:31:13 -0000	1.51
  @@ -300,6 +300,14 @@
   	
      </target>
   
  +   <target name="demo.betwixt" depends="compile" 
  +      description="Runs a demo using the XML tags to generate a Betwixt descriptor">
  +      
  +	<property name="inputFile" value="src/test/org/apache/commons/jelly/xml/betwixt/input.xml"/>

  +	<jelly file="src/test/org/apache/commons/jelly/xml/betwixt/makeBetwixt.jelly" output="target/PO.betwixt"/>

  +	
  +   </target>
  +
      <target name="demo.jsl" depends="compile" 
         description="Runs a simple demo of the JSL tags">
         
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message