Subject: Re: [xsl] element values don't display with value-of From: "Ritu" <rkama@xxxxxxxxxxx> Date: Fri, 1 Nov 2002 11:00:51 -0600 |
Your context is changed to sources/source within <xsl:for-each select="sources/source">. So Try <xsl:value-of select="." /> instead of <xsl:value-of select="source"/> to print the value of current node Ritu ----- Original Message ----- From: <penfool@xxxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, November 01, 2002 10:52 AM Subject: [xsl] element values don't display with value-of > I'm having a problem getting element values to display. > Here is the XML structure: > > articles > article > name /name > description /description > bodyblock > summary /summary > analysis /analysis > sources > source /source > source /source > source /source > /sources > /bodyblock > /article > /articles > > When a bodyblock node is the current context, I call the > following template to show the sources: > > <xsl:template name="list-sources"> > <xsl:for-each select="sources/source"> > <xsl:value-of select="source" /> (value here) > <br/> > </xsl:for-each> > </xsl:template > > Since I get the correct number of "(value here)" lines > for each bodyblock in the results, the source elements > are obviously being parsed, but none of the source > values show up. Am I missing something obvious here? I > am doing the same thing for other nodes (article, > bodyblock)and those work fine. > > I'm using Forte/JSP for development with SAX as the > parser. > > Thanks, > Graham Tillotson > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] element values don't display , penfool | Thread | Re: [xsl] element values don't disp, Vasu Chakkera |
[xsl] element values don't display , penfool | Date | Re: [xsl] element values don't disp, Vasu Chakkera |
Month |