View Single Post
  #3 (permalink)  
Old August 1st, 2007, 10:35 AM
lscjtw lscjtw is offline
Authorized User
 
Join Date: Jul 2007
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sample xml:
<LINE><DATA>Journal1</DATA><DATA>Journal1</DATA><DATA>3000</DATA><DEBIT>400</DEBIT><CREDIT></CREDIT></LINE>
<LINE><DATA>Journal1</DATA><DATA>Journal1</DATA><DATA>4000</DATA><DEBIT></DEBIT><CREDIT>400</CREDIT></LINE>

sample xsl:
<xsl:tempalte match="/">
 <xsl:for-each select="//LINE">
   <xsl:if test="string(DATA)">
  <xsl:variable name="vv"><xsl:value-of select="DATA"/></xsl:variable>
   <HTML>
   <xsl:apply-templates select="//REPORT"/>
   <BODY>
......

right now, the code will print <HTML> tag everytime //DATA contains somethings. how can i set a condition or set variable to make a comparison between previous DATA content with current DATA content?
because i can't store variable to compare, however, is there any aproach to store and access data?

i was thinking using vbscript or javascript,but didn't work. also i look up for <xsl:script> but the sample in the website didn't see to work.

any suggestion?

Reply With Quote