Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 1st, 2004, 04:50 AM
Registered User
 
Join Date: Jun 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Taking action for several attributes

Suppose I have the following in a document:

<myelement env_1="0" env_2="0" env_3="1" env_4="1">
  <childelement>some text</childelement>
</myelement>

Now I want the following result:

<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>

Can anyone help me with this problem?
Thanks in advance, Raoul.


 
Old December 1st, 2004, 07:57 AM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to xxdneu
Default

you can do it like this

<xsl:template match="myelement">
  <xsl:foreach select="./@*">
    <td><xsl:value-of select="."/></td>
  </xsl:foreach>
</xsl:template>

good luck!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Request action on change and get no action. Help crussell Ajax 0 September 12th, 2007 11:11 AM
Script taking too long mmltonge Classic ASP Professional 3 April 16th, 2007 06:56 PM
taking particular data .. anukagni Access 2 August 4th, 2006 12:05 AM
probs while taking backup anukagni MySQL 3 April 20th, 2006 03:47 AM
Taking values from textbox derekl ASP.NET 1.0 and 1.1 Professional 3 February 20th, 2006 08:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.