This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: how to use // starting from the root, when i am few steps und er 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).

Cheers,
Wendell


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]