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]

No match or what...


Hi,

could anyone explain.

I want following result:

library
book
chapter

but I get:

library book chapter
book chapter
chapter


my files:
===========================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml:stylesheet type="text/xsl"?>
<library>
	library
	<book>
		book
		<chapter>
			chapter
		</chapter>
	</book>
</library>
===========================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:transform
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/>

	<xsl:template match="/">
		<HTML>
			<HEAD>
				<TITLE>Test</TITLE>
			</HEAD>

			<BODY>
				<xsl:apply-templates select="library"/>
			</BODY>
		</HTML>
	</xsl:template>

	<xsl:template match = "library">
		<xsl:value-of select="."/>
		<BR/>
		<xsl:apply-templates select="book"/>
	</xsl:template>

	<xsl:template match = "book">
		<xsl:value-of select="."/>
		<BR/>
		<xsl:apply-templates select="chapter"/>
	</xsl:template>

	<xsl:template match = "chapter">
		<xsl:value-of select="."/>
		<BR/>
	</xsl:template>

</xsl:transform>
===========================================
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


 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]