E
Eshrath
Hi,
I have an xsl where a particular child node (<sub1> and <sub2> )can
occur in two type of parent nodes (<A> and <B>).
like
<A>
<sub1>11</sub1>
<sub2>22</sub2>
</A>
<B>
<sub1>33</sub1>
<sub2>44</sub2>
</B>
I am planning to write a common template for this child elements like
<xsl:template match="sub1">
...........
...........
...........
<xsl:template />
Inside this template I want to do different processing depending upon
the parent like if the parent is <A> or if the parent is <B> I need to
do different processing. Like if the parent is <A> then I need to print
"AAAAA" in the template and if the parent is B then I want to print
"BBBBB". Also depeneding upon the ancestor element (not the value) I
want to do different processing. Can you please let me know the statment
or the Xpath expression that is used to find out this?
Thanks in Advance,
-Eshrath.
I have an xsl where a particular child node (<sub1> and <sub2> )can
occur in two type of parent nodes (<A> and <B>).
like
<A>
<sub1>11</sub1>
<sub2>22</sub2>
</A>
<B>
<sub1>33</sub1>
<sub2>44</sub2>
</B>
I am planning to write a common template for this child elements like
<xsl:template match="sub1">
...........
...........
...........
<xsl:template />
Inside this template I want to do different processing depending upon
the parent like if the parent is <A> or if the parent is <B> I need to
do different processing. Like if the parent is <A> then I need to print
"AAAAA" in the template and if the parent is B then I want to print
"BBBBB". Also depeneding upon the ancestor element (not the value) I
want to do different processing. Can you please let me know the statment
or the Xpath expression that is used to find out this?
Thanks in Advance,
-Eshrath.