Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<xsl:value-of select="self::node()"/>

Status
Not open for further replies.

rxg00u

Programmer
Apr 11, 2002
16
0
0
GB
hi just a quick question,
<xsl:value-of select=&quot;self::node()&quot;/> I have been using this line and i pressumed that it would only 'print' the text within a particular tag e.g.
Code:
<SUBQUESTION marks=&quot;10&quot;>Prompts the user to make a choice as to which Circuit parameters are to be supplied, the input
for this choice being a single character as specified below
<POINT>C indicates that the generator is a current source</POINT>
<POINT>V indicates that the generator is a Voltage source</POINT>
<POINT>Q is used to exit the program</POINT>
</SUBQUESTION>
I then have the following lines in my xsl:
Code:
<xsl:template match=&quot;SUBQUESTION&quot;>
        <xsl:value-of select=&quot;self::node()&quot;/>
	<xsl:apply-templates select = &quot;POINT&quot;/>
</xsl:template>
I presummed that <xsl:value-of select=&quot;self::node()&quot;/> would only 'print' the value of subquestion tag and the contents in the point tag would be left and dealt with in the point template in my xsl;
However this is not the case for some reason it 'prints' of the contents in the point tags aswell.
Could anyone point me in the right direction as im not sure if it something im doing wrong or if this is the wrong command to use.
thanks in advance
Rakesh
 
Didn't test this by try it.

<xsl:value-of select=&quot;self::text()&quot;/>

-pete
 
thanks but unfortunately that does not work
thanks for you time
Rakesh
 
Ok, sorry... i did test this

Code:
<xsl:value-of select=&quot;text()&quot;/>

-pete
 
Am I missing something, what's wrong with the usual..

<xsl:value-of select=&quot;.&quot;/>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top