[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Confused with templates and XPath

Subject: Confused with templates and XPath
From: Jarkko.Moilanen@xxxxxx
Date: Thu, 8 Jan 2004 12:54:58 +0200
prologie
Hi,

I am trying to learn howto use FrameMaker to build XML-applications. This fact
is irrelevant here, but just mentioned it as prologie =)

I took a look at the xslt file that this software uses and I found something
that I really cant say to understand. Here are two snippets:


<xsl:template match="//para">
	<div class="para">
		<xsl:apply-templates/>
	</div>
</xsl:template>

<xsl:template match="chapter/para">
	<span class="chapterpara"><xsl:value-of select="."/></span>
</xsl:template>

Doesnt the //para apply to any para in the document? Then why is there
another template for chapter/para? Is the latter one going to override the
previous template? Or is this all about the context from where these
templates are applyed or something like that?

Any comments would be appreciated.

I cant give you any sourcetree example... sorry.

Cheers,
Jarkko


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.