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 |
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@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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: how to use // starting from the, Spychalski, Frank | Thread | RE: how to use // starting from the, Tony Graham |
Why wont this display? <xsl:value-o, Medina, Edward | Date | saxon's: evaluate(string), Ben C. |
Month |