|
Subject: Re: template matching.. display the data From: Duane Nickull <webmaster@xxxxxxxxxxxxxxxxx> Date: Fri, 19 Mar 1999 19:30:38 -0800 |
Hello Nilofer:
Try this
<xsl:for-each select="Name">
Hello, the name is: <xsl:value-of select="Name"/>
</xsl:for-each>
This will print the value of the name for each.
If you want to have it diplayed in blue text, you can use xsl to do
this also.
<xsl:for-each select="Names">
<DIV STYLE="background-color:gray; color:blue; padding:4px;
width:50%%;">
<SPAN STYLE="font-weight:bold; color:blue"><xsl:value-of
select="Names"/></SPAN>
</DIV>
</xsl:for-each>
Any tag that occurs only once like the <xsl:value-of select="Names"/>
it is really important to remember to use the / character after the
select value.
I hope this helps.
Duane Nickull
webmaster@xxxxxxxxxxxxxxxx
"Indexing XML for the Internet"
Nilofer Motiwala wrote:
>
> Hello all,
> I have a question on the template matching.
>
> My Xml file has some data of the form
>
> <Name type="text" color="blue">
> Nilofer
> </Name>
>
> I am interested in matching the type field of the Name tag, and if it is
> a text then displaying the data.
>
> Here is what I tried:
>
> <xsl:template match="Name[@Type='text']">
>
> </xsl:template>
>
> 1) Not too sure how to display the data
> 2) Tried using the xsl:text and xsl:process-children, within the
> tempalte match and IE5 was not happy
>
> does any one know how to go about this task?
>
> Thanks for answering my queries!
>
> Nilofer Motiwala
>
> 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 -> |
|---|---|---|
| template matching.. display the dat, Nilofer Motiwala | Thread | Re: template matching.. display the, Nilofer Motiwala |
| Re: getting xsl to produce ill-form, Duane Nickull | Date | Re: select="*/@UNITS/..", James Tauber |
| Month |