commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl suite.jelly
Date Wed, 20 Nov 2002 06:05:20 GMT
dion        2002/11/19 22:05:20

  Modified:    jelly/src/test/org/apache/commons/jelly/jsl suite.jelly
  Log:
  Added inline version of test case
  
  Revision  Changes    Path
  1.7       +13 -2     jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/suite.jelly
  
  Index: suite.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/suite.jelly,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- suite.jelly	20 Nov 2002 05:54:11 -0000	1.6
  +++ suite.jelly	20 Nov 2002 06:05:19 -0000	1.7
  @@ -144,7 +144,8 @@
            <element2>SomeText</element2>
         </element1>
       </x:parse>
  -    
  +
  +    <!-- stylesheet with embedded set -->    
       <jsl:stylesheet var="contextStyleSheet">
         <jsl:template match="element1">
           <j:set var="contextText">El1<jsl:applyTemplates /></j:set>
  @@ -152,8 +153,18 @@
         <jsl:template match="element2"><x:expr select="."/></jsl:template>
       </jsl:stylesheet>
   
  +    <!-- same stylesheet, no set -->
  +    <jsl:stylesheet var="contextStyleSheet2">
  +      <jsl:template match="element1">El1<jsl:applyTemplates /></jsl:template>
  +      <jsl:template match="element2"><x:expr select="."/></jsl:template>
  +    </jsl:stylesheet>
  +
  +    <!-- test stylesheet 1 -->
       <jsl:style stylesheet="${contextStyleSheet}" select="$testDoc"/>
  -    <m:echo>text is '${contextTest}'</m:echo>
  +    <!-- test stylesheet 2 -->
  +    <j:set var="contextText2"><jsl:style stylesheet="${contextStyleSheet2}" select="$testDoc"/></j:set>
  +    <m:echo>text is '${contextText}', inline is '${contextText2}'</m:echo>
       <test:assertEquals expected="El1SomeText" actual="${contextText}" />
  +    <test:assertEquals expected="El1SomeText" actual="${contextText2}" />
     </test:case>
   </test:suite>
  
  
  

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