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

RE: testing node type

Subject: RE: testing node type
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Fri, 22 Sep 2000 12:01:48 -0400 (EST)
xsl nodetype
At 22 Sep 2000 14:25 +0100, Pawson, David wrote:
 > Linda van den Brink
 > 
 > comment() and processing-instruction()
 > 
 > > As I understand these are not functions but Node Tests, part of XPath.
 > > Mentioned in chapter 6 of XSLT Programmer's reference, and defined in
 > > section 2.3 of XPath. 
 > 
 > Herrumphh. They look like functions to me!
 > *and* they are not in the index! 
 > 
 > (page 372, well buried). Indexed as node test. Sigh.
 > And DC thinks he gets it wrong occasionally ;-)
 > 
 > Thanks Linda.
 > 
 > New 'bit' for the reference card Tony?

No.  Look under the heading "Node Tests [XPath 2.3]".

They look like functions but they're not.  XPath section 3.2, Function
Calls, has:

[16]  FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* ) ')'

but section 3.7, Lexical Structure, has:

[35]  FunctionName ::= QName - NodeType

and

[38]  NodeType     ::= 'comment'
                       | 'text'
                       | 'processing-instruction'
                       | 'node'

So the node type node tests look like function calls but they're not
because their names are explicitly not allowed as function calls.

Regards,


Tony Graham
======================================================================
Tony Graham                            mailto:tgraham@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9632
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================



 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.