RE: how to use // starting from the root, when i am few step
At 22 Aug 2000 19:06 +0200, Spychalski, Frank wrote: > ->-----Original Message----- > ->From: David Allouche [mailto:david@xxxxxxxxxxxxxxxx] > ->Subject: RE: how to use // starting from the root, when i am few steps > ->und er the root, > > Hi, > > ->PS: As far as I know, select="///element... is not legal. > > I didn't find anything that said /// is illegal. It works fine with my > version of Xalan... > And I think it's more logical to write /// than to write //, because for me > the first slash represents the root element and the second and third are the > short version for descendant-or-self, if you look at // you don't know (ok '//' is the abbreviated syntax for '/descendant-or-self::node()/'. See how the expansion contains two '/' that are used to delimit location path steps, and that there is both an axis specifier ('descendant-or-self::') and a node test ('node()') between the delimiters. You need both an axis specifier and a node test to make a minimal location path step in XPath's full syntax. (Location path steps also include zero or more predicates.) Expanding '///' gets you '/descendant-or-self::node()//' (or '//descendant-or-self::node()/'). Maybe Xalan is recursively expanding any '//' to get you '/descendant-or-self::node()/descendant-or-self::node()/', which is legal full syntax, but I don't know that it's proper to use the middle '/' in '///' twice like that. If Xalan does evaluate '///' as '/descendant-or-self::node()/descendant-or-self::node()/', the expression is going to slow down your processing even more than the single '//' does. > YOU do know, but the average user doesn't) if it's starting at the root > element or if it has the meaning of .// > But thats just my 2c. It makes sense to me that "//" starts at the root because of its leading "/", and it makes sense to me that ".//something" or, for example, "PLAY//TITLE" doesn't. Of course, the average user can also download the XSLT and XPath Quick Reference at http://www.mulberrytech.com/quickref/. 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
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