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

Re: Pipe Question

Subject: Re: Pipe Question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 8 Jun 2005 21:51:54 +0100
xsl count pipe
> Where the "()" select will evaluate to an empty sequence when none was
> supplied.  I understand that it could be any valid xpath expression.

I forget whether you are using xslt2 or 1, if using one you can't use ()
but you can use /.. to swlwct an empty node set.

> And the param "my_param" is not supplied you will end up with a copy
> of the document source "/" or current context "." (respectively).  Do
> I have this correct?

for a top level param the current context is the root node so . and /
are the same thing. You don't get a copy the vaiable is bound to the
same node. so for example the counting the node set 
count($my_paran | / )
of the parameter and the document root would return 1 not 2. In
particular defining a parameter this way is not expensive (whereas doing
<xsl:copy-of select="/"/> is expensive and generates a copy of the input
(if it is being copied into a variable.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.