ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/etc junit-frames.xsl junit-noframes.xsl
Date Wed, 06 Feb 2002 20:53:15 GMT
sbailliez    02/02/06 12:53:15

  Modified:    src/etc  junit-frames.xsl junit-noframes.xsl
  Log:
  - Fixed JavaScript escaping for properties.
  - Added copyright
  Submitted by: K.C. Baltz, kbaltz@mail.responsenetworks.com
  
  Revision  Changes    Path
  1.9       +67 -30    jakarta-ant/src/etc/junit-frames.xsl
  
  Index: junit-frames.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/junit-frames.xsl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- junit-frames.xsl	14 Jan 2002 00:59:40 -0000	1.8
  +++ junit-frames.xsl	6 Feb 2002 20:53:14 -0000	1.9
  @@ -2,32 +2,72 @@
   	xmlns:lxslt="http://xml.apache.org/xslt"
   	xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
   	extension-element-prefixes="redirect">
  -
  -
  -<!-- ======================================================================
  -
  -    Stylesheet to transform an XML file generated by the Ant JUnit task into
  -    a set of JavaDoc-like HTML page to make pages more convenient to be browsed.
  -    
  -    It use the Xalan redirect extension to write to multiple output files.
  -    
  -    Note: HTML output can be made much more clean by removing non css attributes
  -
  -    ====================================================================== -->
   <xsl:output method="html" indent="yes"/>
   <xsl:decimal-format decimal-separator="." grouping-separator=","/>
  +<!--
  + The Apache Software License, Version 1.1
  +
  + Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + reserved.
  +
  + Redistribution and use in source and binary forms, with or without
  + modification, are permitted provided that the following conditions
  + are met:
  +
  + 1. Redistributions of source code must retain the above copyright
  +    notice, this list of conditions and the following disclaimer.
  +
  + 2. Redistributions in binary form must reproduce the above copyright
  +    notice, this list of conditions and the following disclaimer in
  +    the documentation and/or other materials provided with the
  +    distribution.
  +
  + 3. The end-user documentation included with the redistribution, if
  +    any, must include the following acknowlegement:
  +       "This product includes software developed by the
  +        Apache Software Foundation (http://www.apache.org/)."
  +    Alternately, this acknowlegement may appear in the software itself,
  +    if and wherever such third-party acknowlegements normally appear.
  +
  + 4. The names "The Jakarta Project", "Ant", and "Apache Software
  +    Foundation" must not be used to endorse or promote products derived
  +    from this software without prior written permission. For written
  +    permission, please contact apache@apache.org.
  +
  + 5. Products derived from this software may not be called "Apache"
  +    nor may "Apache" appear in their names without prior written
  +    permission of the Apache Group.
  +
  + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + SUCH DAMAGE.
  + ====================================================================
  +
  + This software consists of voluntary contributions made by many
  + individuals on behalf of the Apache Software Foundation.  For more
  + information on the Apache Software Foundation, please see
  + <http://www.apache.org/>.
  + -->
   
   <!--
  -    Xalan redirect extension writes relative file based on the parent directory
  -    from the main output file, unfortunately, this is never set and you have
  -    to do it yourself on the API. The code that does it in command line was
  -    commented out in Xalan 1.2.2 :-(
  -    
  -    Therefore I will use a stylesheet param for the output directory.
  -    
  -    This has to be invoked as follows from the command line:
  -    
  -    java -classpath bsf.jar;xalan.jar;xerces.jar org.apache.xalan.xslt.Process -IN testsuites.xml
-XSL junit-frames.xsl -PARAM output.dir './report'
  + 
  + Sample stylesheet to be used with An JUnitReport output.
  + 
  + It creates a set of HTML files a la javadoc where you can browse easily
  + through all packages and classes.
  + 
  + @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
  + @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
  + 
   -->
   <xsl:param name="output.dir" select="'.'"/>
   
  @@ -331,7 +371,6 @@
   </xsl:template>
   
   <xsl:template match="testsuite" mode="all.classes">
  -	<!-- (ancestor::package)[last()] is buggy in MSXML3, fixed in SP1? -->
   	<xsl:variable name="package.name" select="@package"/>
   	<tr>
   		<td nowrap="nowrap">
  @@ -653,14 +692,12 @@
   
   <xsl:template name="JS-escape">
   	<xsl:param name="string"/>
  -	<xsl:choose><!-- something isn't right here, basically all single quotes need
to be replaced with backslash-single-quote
  -		<xsl:when test="contains($string,'&apos;')">
  -			<xsl:value-of select="substring-before($string,'&apos;')"/>
  -			\&apos;
  -			<xsl:call-template name="JS-escape">
  -				<xsl:with-param name="string" select="substring-after($string,'&apos;')"/>
  +	<xsl:choose>
  +		<xsl:when test="contains($string,&quot;'&quot;)">
  +			<xsl:value-of select="substring-before($string,&quot;'&quot;)"/>\&apos;<xsl:call-template
name="JS-escape">
  +				<xsl:with-param name="string" select="substring-after($string,&quot;'&quot;)"/>
   			</xsl:call-template>
  -		</xsl:when> -->
  +		</xsl:when> 
   		<xsl:when test="contains($string,'\')">
   			<xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template
name="JS-escape">
   				<xsl:with-param name="string" select="substring-after($string,'\')"/>
  
  
  
  1.6       +69 -7     jakarta-ant/src/etc/junit-noframes.xsl
  
  Index: junit-noframes.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/junit-noframes.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- junit-noframes.xsl	14 Jan 2002 00:59:40 -0000	1.5
  +++ junit-noframes.xsl	6 Feb 2002 20:53:14 -0000	1.6
  @@ -1,7 +1,71 @@
   <xsl:stylesheet	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
   <xsl:output method="html" indent="yes"/>
   <xsl:decimal-format decimal-separator="." grouping-separator="," />
  +<!--
  + The Apache Software License, Version 1.1
   
  + Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + reserved.
  +
  + Redistribution and use in source and binary forms, with or without
  + modification, are permitted provided that the following conditions
  + are met:
  +
  + 1. Redistributions of source code must retain the above copyright
  +    notice, this list of conditions and the following disclaimer.
  +
  + 2. Redistributions in binary form must reproduce the above copyright
  +    notice, this list of conditions and the following disclaimer in
  +    the documentation and/or other materials provided with the
  +    distribution.
  +
  + 3. The end-user documentation included with the redistribution, if
  +    any, must include the following acknowlegement:
  +       "This product includes software developed by the
  +        Apache Software Foundation (http://www.apache.org/)."
  +    Alternately, this acknowlegement may appear in the software itself,
  +    if and wherever such third-party acknowlegements normally appear.
  +
  + 4. The names "The Jakarta Project", "Ant", and "Apache Software
  +    Foundation" must not be used to endorse or promote products derived
  +    from this software without prior written permission. For written
  +    permission, please contact apache@apache.org.
  +
  + 5. Products derived from this software may not be called "Apache"
  +    nor may "Apache" appear in their names without prior written
  +    permission of the Apache Group.
  +
  + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + SUCH DAMAGE.
  + ====================================================================
  +
  + This software consists of voluntary contributions made by many
  + individuals on behalf of the Apache Software Foundation.  For more
  + information on the Apache Software Foundation, please see
  + <http://www.apache.org/>.
  + -->
  + 
  +<!--
  + 
  + Sample stylesheet to be used with An JUnitReport output.
  + 
  + It creates a non-framed report that can be useful to send via
  + e-mail or such.
  + 
  + @author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
  + @author Erik Hatcher <a href="mailto:ehatcher@apache.org"/>
  + 
  +-->
   <xsl:template match="testsuites">
   	<HTML>
   		<HEAD>
  @@ -401,14 +465,12 @@
   
   <xsl:template name="JS-escape">
   	<xsl:param name="string"/>
  -	<xsl:choose><!-- something isn't right here, basically all single quotes need
to be replaced with backslash-single-quote
  -		<xsl:when test="contains($string,'&apos;')">
  -			<xsl:value-of select="substring-before($string,'&apos;')"/>
  -			\&apos;
  -			<xsl:call-template name="JS-escape">
  -				<xsl:with-param name="string" select="substring-after($string,'&apos;')"/>
  +	<xsl:choose>
  +		<xsl:when test="contains($string,&quot;'&quot;)">
  +			<xsl:value-of select="substring-before($string,&quot;'&quot;)"/>\&apos;<xsl:call-template
name="JS-escape">
  +				<xsl:with-param name="string" select="substring-after($string,&quot;'&quot;)"/>
   			</xsl:call-template>
  -		</xsl:when> -->
  +		</xsl:when> 
   		<xsl:when test="contains($string,'\')">
   			<xsl:value-of select="substring-before($string,'\')"/>\\<xsl:call-template
name="JS-escape">
   				<xsl:with-param name="string" select="substring-after($string,'\')"/>
  
  
  

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


Mime
View raw message