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

Sibling in the Pattern(match)

Subject: Sibling in the Pattern(match)
From: Dongling Ding <dling61@xxxxxxxxx>
Date: Sun, 23 Nov 2003 18:27:47 -0800 (PST)
xsl sibling nodes
Hi,

I want to perform a filering out transformation to a
source file. I copy most things, but leave out specfic
parts.

The left out part can be done like this:

<xsl:template match="execluded-nodes">
"do nothing"
</xsl:template>

<xsl:template match="child::Member[@name ='acc1']"/>

There is a problem with this approach. It seems like
you only can specify "child" or "attribute" in the
match pattern.

What can I do if I want to execlude all the nodes
having the same level as a selected nodel?

For example, the selected node is "acc11", all the
nodes having the same level like "acc12", "acc31", and
"acc32" will be also included

What can I do if I want to execlude all the sibling
nodes of a selected node?

For example, the selected node is "acc11", the "acc12"
will be also included".


Is there any good thought on this? Thanks

Dongling


(Source XML File)
<Member comment="" name="acc1">
		<Calc>+</Calc>
		<Member comment="" name="acc11">
			<Calc>+</Calc>
			<Member name="account3_1"/>
		</Member>
		<Member comment="" name="acc12">
			<Calc>+</Calc>
			<Member name="account3_1"/>
		</Member>
	</Member>
	<Member comment="" name="acc2">
		<Calc>+</Calc>
	</Member>
	<Member comment="" name="acc3">
		<Calc>+</Calc>
		<Member comment="" name="acc31">
			<Calc>+</Calc>
		</Member>
		<Member comment="" name="acc32">
			<Calc>+</Calc>
		</Member>
	</Member>





__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

 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.