This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to send and use data in other template?


I know how to use variable in same template.
But how to use same variable in other template?
Could I get example of case?
For example xml-file:

<existence>
 <entity>
  <!-- data in several "tags" -->
  <id>12</id>
  .
  .
  .
 <entity>
 <attri>
  <!-- data -->
 </attri>
</existence>

xsl-file:

<xsl:template match="existence/entity">
<xsl:variable name="first" select="id"> <!-- variable creation and it 
works here -->
 <xsl:value-of select="id" />
</xsl:variable>
.
.
.
</xsl:template>

<xsl:template match="existence/attri">
<!-- how to use variable here or how to use "data of id" here?   -->
<!-- for example in if case... -->
<xsl:if test="first = //attri/idref1">
<!-- first is variable, but what kind of it should be that it works here 
--> 
</xsl:template>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]