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

RE: Xsl problem (template matching)

Subject: RE: Xsl problem (template matching)
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Dec 1999 00:37:59 -0500
bhavesh rules
 Hello,

Don't worry, that's how XSL works. You can declare template rules so that
they will only fire if elements are in particular contexts, or so that do
they do so all the time.

For example:

<xsl:template match="display-type">
<!--rules here -->
</xsl:template>

will fire for all display-type elements in your document, whereas:

<xsl:template match="display-type[@value='bullets']">
<!--rules here -->
</xsl:template>

and

<xsl:template match="example/display-type">
<!--rules here -->
</xsl:template>

will only fire in particular contexts.

I hope that helps. Do take a look at the XPath spec @ http://w3.org/TR/xpath

Richard

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of bhavesh bhanushali
Sent: Saturday, December 18, 1999 12:16 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Xsl problem (template matching)


Hi

I am newbie in xsl.
My problem is:-
I want to apply a particular template where ever that particular node exist
i.e independent of its parent elements.


for e.g
<example>
<name>xxxy</name>
<display-type value="bullets">
<training>xyz</training>
</display-type>
<section>aaaa</section>
<display-type value="bullets">
<topic>Hello</topic>
</display-type>
</example>

I want to match (display-type) node and use the same template whereever it
is present.
I hope u understand. Can Anyone suggest the solution.
Thanks in Advance

With Regards
Bhavesh

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com?sr=mc.mk.mcm.tag001


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


 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.