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

RE: Union of StepPattern

Subject: RE: Union of StepPattern
From: Adam Van Den Hoven <Adam.Hoven@xxxxxxxxxxxx>
Date: Thu, 15 Feb 2001 16:51:25 -0800
RE:  Union of StepPattern
Thanks Mike, 

Michael Kay wrote:
> > 	<xsl:template match="DIV[parent::LI]">
> 
> That's fine, though most people write match="LI/DIV" which 
> means the same.

Never let it be said that I do thing in a common way... ;)

Is there any reason to do one over the other? Does one perform better than
the other?

> Technically the value of the variable is a unordered node-set, and the
> filter expression $following-valid[1] selects the node in 
> this node-set that
> comes first in document order. So in effect, yes, you're OK.

So is it always the case then that an unordered list will always be accessed
in document order? One would hope so but can one be sure of it?

> But the "=" test is wrong: it compares the string-values of 
> the nodes, not
> their identity. To compare identity, use 
> generate-id(X)=generate-id(Y), or
> count(X|Y)=1. Except that in this case, I think you can 
> simply say <xsl:if
> test="$following-valid[1][self::DIV]">.

Its certainly more elegant than what I had. Since it produced the same
output, I'll use yours.

Thanks again. It was a great help.
Adam van den Hoven

 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.