This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How do I reference the name of a tag?
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: How do I reference the name of a tag?
- From: zuzmi at brience dot com (Z. Uzmi)
- Date: Wed, 31 May 2000 12:45:50 -0700
- Cc: <jhbooth at hotmail dot com>
- Reply-To: xsl-list at mulberrytech dot com
Looks like you are making sometag and someothertag the attributes of "yet
another tag" :-). You should then match for that "yet another tag" and use
the xsl:attribute (syntax in XML bible)...
zartash
> -----Original Message-----
> From: owner-xsl-list@mulberrytech.com
> [mailto:owner-xsl-list@mulberrytech.com]On Behalf Of
> jhbooth@microsoft.com
> Sent: Wednesday, May 31, 2000 10:46 AM
> To: xsl-list@mulberrytech.com
> Cc: jhbooth@hotmail.com
> Subject: How do I reference the name of a tag?
>
>
>
> If I have a source like this:
>
> <sometag>blah</sometag>
> <someothertag>blah blah</someothertag>
>
> that I want to transform to:
>
> <attribute name="sometag">
> <value>blah</value>
> </attribute>
> <attribute name="someothertag">
> <value>blah blah</value>
> </attribute>
>
> how can I get at the expanded-name of sometag and someothertag?
>
> I don't want to have a template match for sometag, because I
> don't know in advance what all the possible tags could be, so I
> want a template to match * and still produce the above.
>
> Any ideas?
>
> thanks,
> James Booth
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list