This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How do I pull out an element name out for use as a aprinted variable


You want something like

<xsl:for-each select="*">
  <td><xsl:value-of select="name()"/></td>
</xsl:for-each>

Or have I misunderstood?

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Eric
> Schenfeld
> Sent: 21 June 2001 20:35
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] How do I pull out an element name out for use as a
> aprinted variable
> 
> 
> I have the following XML structure:
> <contacts>
> <contact>
>      <name>xxxx</name>
>      <title>Program Director</title>
>      <phone>xxx.xxx.xxxx</phone>
>      <email>
>       <link 
> mailto:href="mailto:xxxxxxx@xxxxxxxx.xx>xxxxxxx@xxxxxxx.xxx</link>
>      </email>
> </contact>
> </contacts>
> 
> The children elements of contact vary slightly between 
> different contact lists.  Because of this, the tables in 
> which they appear should often have different headers (which 
> would just be the name of that child element... ie name, 
> title, phone, email ... in this case).  I tried using the 
> recommendation in the FAQ under the first table section but i 
> couldn't get it to work for children elements instead of the 
> attributes.  Any help is appreciated.
> eric
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]