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

RE: how to use // starting from the root, when i am few step

Subject: RE: how to use // starting from the root, when i am few steps und er the root,
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 22 Aug 2000 14:58:32 +0100
RE: how to use // starting from the root
At 07:06 PM 8/22/00 +0200, Frank wrote:
>I didn't find anything that said /// is illegal.

It's not legal because of the way it breaks out: it fails to follow the
rule that a location path step is an axis specifier followed by a node test
(and optional predicates).

> It works fine with my
>version of Xalan...

Both XT and Saxon gag on "///element". Thank goodness. Your version of
Xalan does not conform in this respect.

>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
>YOU do know, but the average user doesn't) if it's starting at the root
>element or if it has the meaning of .//

It's not more logical to write "///" if you know that "//" is an
abbreviation of "/descendent-or-self::node()/" (XPath 2.5). It is *not*
"the short version for descendant-or-self": it's more precise than that.

"//" doesn't start at the current node any more than "/element". It's not
that hard.

To suggest that it's "more logical" to do it a way that makes no sense
according to the spec because the "average user" would be confused by what
the spec says, and what the heck, is basically to say that it's okay to be
confused, as long as we can make something up, and in fact we should
encourage it, and what the spec says simply doesn't matter. Do any of us
really want to go that way?

Please don't defend Xalan's bug. My $0.02 (okay $0.03).


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
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

Current Thread


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.
First Name
Last Name
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.