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]
Other format: [Raw text]

RE: Getting name of and element


Well, the problem is that I actually have code that tries to do this like:
<xsl:template match="/">
XXX<xsl:value-of select="name"/>YYY <br/>
...
Which output in the start of the result:
XXXYYY
(meaning that it doesn't get any value, but the rest of the document is 
output, so there does exist nodes).

What is wrong here?


By the way, is there a diffrence between
<xsl:template match="/"> that I use and
<xsl:template match="/*"> that you use?

Hope you can help me
Ragulf :)



>From: "Chris Bayes" <chris@bayes.co.uk>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: <xsl-list@lists.mulberrytech.com>
>Subject: RE: [xsl] Getting name of and element
>Date: Fri, 16 Nov 2001 11:27:48 -0000
>
>Pickaxe,
><?xml version="1.0" ?>
><test att1="" att2="" att3="">
></test>
>
><?xml version="1.0"?>
><xsl:stylesheet version="1.0"
>xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>	<xsl:output method = "html" encoding="Windows-1252" />
>
>	<xsl:template match="/*">
>		<html>
>			<head></head>
>			<body>My top level element is <xsl:value-of
>select="name()" /><br/>
>				  It's attributes are <xsl:for-each
>select="@*">
>				  	<xsl:value-of select="name()" />
>				  </xsl:for-each>
>			</body>
>		</html>
>	</xsl:template>
></xsl:stylesheet>
>
>Ciao Chris
>
>XML/XSL Portal
>http://www.bayes.co.uk/xml


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 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]