[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Xalan extension function


Subject: [xsl] Xalan extension function
From: "Sathasivam, Elayaraja" <elayaraja.sathasivam@xxxxxxxxxxxxx>
Date: Mon, 28 Jul 2008 11:34:01 +0530

How to print the attibute value of <xsl:value-of
select="../AccessFeesGroup/@groupType"/> ?????  such as

<xsl:variable name="VariantA">
    <AccessFeesGroupList>
            <xsl:call-template name="createAccessFeesPeriods"/>
    </AccessFeesGroupList>
</xsl:variable>

<xsl:template match="/">
     <xsl:for-each
select="xalan:nodeset($VariantA)/AccessFeesGroupList/AccessFeesGroup">
        MValue: <xsl:value-of select="../AccessFeesGroup/@groupType"/> :
    </xsl:for-each>
</xsl:template>


<xsl:template name="createAccessFeesPeriods">
    <xsl:for-each
select="Document/Invoice/InvoiceItem[@CT='A']/AggSet/Att[@Ty='TM'][gener
ate-id() = generate-id(key('by-id', @Id)[1])]">
      <xsl:variable name="SN_Id" select="../Att[@Ty='SN']/@Id"/>
      <xsl:variable name="groupTypeValue">
          <xsl:choose>
	      <xsl:when test="$SN_Id='TEL'">B</xsl:when>
	      <xsl:when test="$SN_Id='*ToDo
/Configuration/Groupings/BundleServices *'">BUN</xsl:when>
	      <xsl:when test="$SN_Id='*ToDo
/Configuration/Groupings/P1Services  *'">P1</xsl:when>
	      <xsl:otherwise>P2</xsl:otherwise>
	  </xsl:choose>
      </xsl:variable>
      <xsl:value-of select="$groupTypeValue"/>&sep; <!-- Just To show
the output of groupType -->
      <AccessFeesGroup groupType="$groupTypeValue">
          <Period dateFrom='20080202' dateTo='' discountValue=''
invoiceLineValue='' vatValue=''/>
      </AccessFeesGroup>
    </xsl:for-each>
</xsl:template>

Note: The value of $groupTypeValue is 'B'

Expected output:        MValue: B
Acutal output: No output ????????



Regards,
ElayaRaja







This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any
part thereof. If you receive this message
in error, please notify the sender immediately and delete all copies of this
message.


Current Thread