Subject: [xsl] <xsl:for-each select> and acessing the parent tag's attribute From: Priya Pinto <Priya.P@xxxxxxxxxxxxxxxxxx> Date: Sun, 15 Apr 2001 17:48:50 +0400 |
Hi, I want to know how to get the value of the parent tag when you are in an <xsl:for-each select> of the child tag Here is an illustration of what I want this is the xml file <?xml version="1.0" encoding="UTF-8"?> <World> <Country Name="Afghanistan"> <Region Name="Herat"> <City Name="Herat"></City> </Region> <City Name="Kabul"></City> <City Name="Kandahar"></City> <City Name="Mazar-e Sharif"></City> </Country> <Country Name="Albania"> <City Name="Shkoder"></City> <City Name="Tirane"></City> </Country> </World> The XSL code <xsl:for-each select="World/Country/City"> <row> <country><xsl:value-of select="World/Country/@Name"/></country> <region><xsl:value-of select="Region/@Name"/></region> <city><xsl:value-of select="Region/City/@Name"/></city> </row> This code does not give me the required result. Thanks Priya Sincerely, Priya Ann Pinto Software Engineer - Java Email : Priya.P@xxxxxxx ___________________________________________________________________ ITCC FZ L.L.C P.O. Box 74500 Dubai, United Arab Emirates Phone : +971 4 330 3778 Fax : +971 4 330 3779 Website : http://www.ITCC.ws This message and any attachments are confidential to the ordinary user of the email address to which it is addressed and may also be legally privileged. If you are not the intended recipient, the printing, copying, forwarding, disclosure, or use of any part of this message or its attachments is strictly prohibited, and may be unlawful. If you have received this message in error, please inform the sender immediately by return e-mail and then promptly delete it from your system. We strongly recommend that you read the complete version of this confidentiality note and disclaimer, available on our website at http://www.ITCC.ws/email_disclaimer.html XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Check for null value and , Dan Diebolt | Thread | Re: [xsl] <xsl:for-each select> and, cutlass |
[xsl] Check for null value and Chec, Priya Pinto | Date | Re: [xsl] Check for null value and , Jeni Tennison |
Month |