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

Re: Not So Newbie XPath Question

Subject: Re: Not So Newbie XPath Question
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Feb 2001 16:18:33 +0000
ixmldomelement selectsinglenode
Hi Bernard,

>> This will only work in a select expression because match patterns
>> don't allow following-sibling:: axes.  For a match pattern, you need
>> something like you have already or one of its equivalents, like:
>
> Is it only the following-sibling:: that does not work in a match or
> does any "forward" axes like following:: not work as well? I have
> been using my existing version with MSXML's
> IXMLDOMElement.selectSingleNode method?

You can only use the 'child' and 'attribute' axes in match patterns
(and the descendant-or-self axis, but only in its shortened form [i.e.
//]). So things like following:: or preceding:: or ancestor:: (or even
namespace::, somewhat annoyingly) aren't acceptable.

When I say 'in match patterns' I'm only talking about the axes used in
the pattern steps, not the expressions that you can place inside
predicates (those are select expressions), so it's possible to have:

  foo/bar[following-sibling::baz]

but not:

  foo/baz/preceding-sibling::bar

As is indicated by its name, IXMLDOMElement.selectSingleNode *selects*
a node, so anything goes. Reading the MSXML documentation, it's a
little confusing because it keeps talking about returning 'matched'
nodes, but trust me - they're select expressions :)

Match patterns are 'only' used in template matches, numbering and key
matches in XSLT. There might be other uses in MSXML, but I don't know
of them.

I hope clears things up a bit,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.