xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Hopkins" <alist...@berthengron.co.uk>
Subject RE: XSLT question
Date Fri, 23 Feb 2001 12:04:49 GMT
<xsl:template match="something/*">
 <xsl:value-of select="name()"/>=<xsl:value-of select="."/>
</xsl:template>

I believe will do the trick, see also local-name() to lose any namespace you
may use.

Also irrelevant perhaps,

I started writing a java/xsl thing called XSLDoc which aimed to create
javadoc-style documentation for sets of stylesheets that import each other,
etc.  Does anyone know of a mature example of this sort of thing?

Alistair

-----Original Message-----
From: Samson, Lyndon [IT] [mailto:lyndon.samson@ssmb.com]
Sent: Friday, February 23, 2001 11:51 AM
To: 'general@xml.apache.org'
Subject: XSLT question


Hi Listers

I have a XSLT template which match="something/*" I want to reference the
name of
the sub element matched in the output.

ie

input

<something>
  <subthing1>aa</subthing1>
  <subthing2>bb</subthing2>
  <subotherthing1>cc</subotherthing1>
</something>

template

<xsl:template match="something/*">
 <xsl:what-do-use-here>=<xsl:value-of select="."/>
</xsl:template>

output

subthing1=aa
subthing2=bb
...

I know this is allmost certainly massivly simple, yet still I can't get it,
I'm just a doofus I guess :-)

thanks

PS. To the pedants, I know this is slighty off topic, sorry...

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org



Mime
View raw message