|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: dynamic sorting
both expressions should give the same result? 1. select="count(someNode)" 2. select="count(*[name() = someNode])" No the first one is similar to 2. select="count(*[name() = 'someNode'])" as you have it, without the quotes, you are selecting elements whose name is equal to the string content of their someNode child, ie things like <abc>auk iu <someNode>abc</someNode> jhg </abc> would be selected as name() and someNode both have string value 'abc'. > What do you mean with "namespace-safe"? If you use a document with namespaces (eg a stylesheet) then selecting count(xsl:variable) will tell you how many variable elements in the xsl namespace are there even if the stylesheet uses a different prefix or no prefix for xsl elements. count(*[name()='xsl:variable']) might tell you how many xsl:variable elements are there, but if the user used a different prefix they probably won't be counted and even if the user used teh prefix "xsl" they may not be counted as the XML parser is allowed to ignore the prefixes used and substitite its own normalised prefix (although most do not do this). David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. 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 ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








