[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: template matching.. display the data

Subject: RE: template matching.. display the data
From: "Wendy Cameron" <wendy.cameron@xxxxxxxxx>
Date: Tue, 23 Mar 1999 10:15:13 +1000
xsl for each template matching
Check the structure of your XML
Match="/" matches the root node
and xsl:for-each assumes that Name is a child of the root node.

If this is your structure then pass I dunno what are you using?

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Nilofer Motiwala
Sent: Tuesday, 23 March 1999 8:59:AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: template matching.. display the data


Duane,
	Thanks for the response. However the <value-of select> tag is 
not living up to expectations!

here is my xsl file

<xsl:template match="/">
   <xsl:for-each select="Name">
      <xsl:value-of select="Name"/>
   </xsl:for-each>
</xsl:template>

This however produces a blank page.

If i put in a "Hello world" in side of the for-each, it get's printed out!

So where am i going wrong here?

Would be great if someone could point out my mistake.

Thanks much
Nilu

---------- Forwarded message ----------
Date: Mon, 22 Mar 1999 13:36:56 -0800 (PST)
From: Nilu <nmotiwal@xxxxxxxxxxxxxx>
Reply-To: nmotiwal@xxxxxxxx
To: nilum
Subject: Re: template matching.. display the data (fwd)



--------------------------------------------------------------------------	
When the going gets tough, 
The tough gets going!
		
			Nilofer Motiwala
			*****************
---------------------------------------------------------------------------

---------- Forwarded message ----------
Date: Fri, 19 Mar 1999 19:30:38 -0800
From: Duane Nickull <webmaster@xxxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: template matching.. display the data

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


 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.