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

Re: how to extract chid node?

Subject: Re: how to extract chid node?
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Tue, 21 Aug 2001 15:55:28 -0700 (PDT)
xslt extract node
Hi, Sunil:

  If you just need to extract langstring element,
instead of <xsl:value-of select="."/>, just replace it
with <xsl:value-of select="langstring"/>.

Hope this helps,
Xiaocun

--- Sunil Dua <sdua@xxxxxxxxxxxxxxx> wrote:
> Hello there,
> 
> 
> I have a xml code like the following which is well
> formatted and valid..
> 
> 		<cc:classification
>
xmlns:cc="http://www.cecity.com/xml/cecity_classification">
> 			<cc:keywords>
> 				<cc:keyword>
> 					<type>profession</type>
> 					<ID>1071</ID>
> 					<langstring lang="en_US">Physician</langstring>
> 				</cc:keyword>
> 				<cc:keyword>
> 					<type>topic</type>
> 					<ID>2247</ID>
> 					<langstring
> lang="en_US">Psychiatry</langstring>
> 				</cc:keyword>
> 				<cc:keyword>
> 					<type>product_category</type>
> 					<ID>1118</ID>
> 					<langstring
> lang="en_US">ANXIOLYTICS</langstring>
> 				</cc:keyword>
> 				<cc:keyword>
> 					<type>disease</type>
> 					<ID>620</ID>
> 					<langstring
> lang="en_US">DEPRESSION</langstring>
> 				</cc:keyword>
> 			</cc:keywords>
> 		</cc:classification>
> 
> I have to extract a child node langstring, which is
> under cc:keyword.. my
> xslt code extract me entire block under cc:keyword
> but not the only
> langstring. XSLT code, I  am using is as follows:
> 
> 	<xsl:template match="cc:keywords">
> 	<TD>
>    		<xsl:for-each
> select="./cc:keyword[type='topic']">
> 			<xsl:value-of select="."/>
> 			<xsl:text>,  </xsl:text>
>    		</xsl:for-each>
> 	</TD>
> 	</xsl:template>
> 
> Could anybody help me?
> 
> thanks a lot
> Sunil Dua
> 
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 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.