This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How do i get a name-value pair in HTML output
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] How do i get a name-value pair in HTML output
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Tue, 23 Jan 2001 10:03:10 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I have an abitrary XML doc looking something like this :
>
> <?xml version="1.0"?>
> <myroot value1="first"
> value2="second"
> value3="third">
>
> now i want to able to run this through XSLT producing an html like :
>
> myroot
> value1=first
> value2=second
> value3=third
You could kick-start the solution with
<xsl:value-of select="name()"/>
<xsl:for-each select="@*">
<xsl:value-of select="concat(name(), ' = ', .)"/>
</xsl:for-each>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list