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 maven.xml project.xml
Date Mon, 22 Jul 2002 10:47:24 GMT
jstrachan    2002/07/22 03:47:23

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/xml
                        CopyTag.java
               jelly    maven.xml project.xml
  Log:
  patched the XML and JSL tag library so that the <copy> tag works properly when creating
declarative XSLT-like scripts in Jelly
  
  Revision  Changes    Path
  1.2       +14 -17    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/CopyTag.java
  
  Index: CopyTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/xml/CopyTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CopyTag.java	18 Jun 2002 08:31:02 -0000	1.1
  +++ CopyTag.java	22 Jul 2002 10:47:23 -0000	1.2
  @@ -95,27 +95,24 @@
   	public void doTag(XMLOutput output) throws Exception {
   		Object xpathContext = getXPathContext();
   
  -		if (select == null) {
  -			throw new MissingAttributeException("select");
  +        Object node = xpathContext;
  +        
  +		if (select != null) {
  +            node = select.selectSingleNode(xpathContext);
   		}
   
  -		SAXWriter saxWriter = new SAXWriter(output, output);
  -		Object node = select.selectSingleNode(xpathContext);
  -		if (node instanceof Element) {
  -			Element element = (Element) node;
  -            throw new JellyException( "Not implemented yet!" );
  -/**
  -  ### need to add these methods to dom4j            
  +        if ( node instanceof Element ) {
  +            Element element = (Element) node;
  +            
  +            SAXWriter saxWriter = new SAXWriter(output, output);
  +            
               saxWriter.writeOpen(element);
  +            invokeBody(output);
               saxWriter.writeClose(element);
  -*/            
  -		} 
  -        else if (node instanceof Node) {
  -			saxWriter.write((Node) node);
  -		} 
  -        else if (node != null) {
  -			output.write(node.toString());
  -		}
  +        }
  +        else {
  +            invokeBody(output);
  +        }
       }
   
       // Properties
  
  
  
  1.17      +44 -0     jakarta-commons-sandbox/jelly/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/maven.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- maven.xml	22 Jul 2002 07:16:52 -0000	1.16
  +++ maven.xml	22 Jul 2002 10:47:23 -0000	1.17
  @@ -250,7 +250,51 @@
     </goal>
   
   
  +   <goal name="demo:jsl" prereqs="jelly-task" 
  +      description="Runs a simple demo of the JSL tags">
   
  +<!--      
  +	<jelly file="src/test/org/apache/commons/jelly/jsl/example.jelly"/> 
  +-->	
  +    <java classname="org.apache.commons.jelly.Jelly" fork="yes">
  +      <classpath refid="test.classpath"/>
  +      <arg value="src/test/org/apache/commons/jelly/jsl/example.jelly"/> 
  +    </java>
  +	
  +   </goal>
  +
  +   <goal name="demo:jsl2" prereqs="jelly-task" 
  +      description="Runs demo #2 of the JSL tags">
  +      
  +<!--      
  +	<jelly file="src/test/org/apache/commons/jelly/jsl/example2.jelly"/> 
  +-->	
  +    <java classname="org.apache.commons.jelly.Jelly" fork="yes">
  +      <classpath refid="test.classpath"/>
  +      <arg value="src/test/org/apache/commons/jelly/jsl/example2.jelly"/> 
  +    </java>
  +	
  +	
  +   </goal>
  +
  +
  +   <demo name="demo:sql" prereqs="jelly-task" 
  +      description="Runs an SQL demo">
  +      
  +      <!-- Values used for testing -->
  +	  <property name="databaseUrl"             value="jdbc:hsqldb:hsql://localhost"/>
  +	  <property name="databaseDriver"          value="org.hsqldb.jdbcDriver"/>
  +	  <property name="databaseUser"            value="sa"/>
  +	  <property name="databaseTable"           value="SYSTEM_TABLES"/>
  +
  +	<echo message="Running examples and outputting results to target directory"/>
  +	
  +	<jelly file="src/test/org/apache/commons/jelly/sql/example.jelly" output="target/sqloutput.xml"/>
  +	<jelly file="src/test/org/apache/commons/jelly/sql/example2.jelly" output="target/sqloutput2.xml"/>

  +	<jelly file="src/test/org/apache/commons/jelly/sql/testSql.jelly" output="target/sqloutput3.xml"/>
	
  +   </demo>
  +   
  +	
   
     <goal name="demo:tagdef" prereqs="java:compile"
       description="A demonstration of the use of tagdef inside a Maven build">
  
  
  
  1.44      +1 -1      jakarta-commons-sandbox/jelly/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/project.xml,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- project.xml	19 Jul 2002 22:19:32 -0000	1.43
  +++ project.xml	22 Jul 2002 10:47:23 -0000	1.44
  @@ -137,7 +137,7 @@
   
       <dependency>
         <id>dom4j</id>
  -      <version>1.4-dev-4</version>
  +      <version>1.4-dev-5</version>
       </dependency>
   
       <dependency>
  
  
  

--
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