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]
Other format: [Raw text]

Re: DOM and XML parser


Hi Didier,

> Exact. Sorry I forgot to say that the match attribute's value is
> valid only for an Xpath subset. The subset that refers to a single
> node. So to recap:
>
> a) the match attribute uses a subset of Xpath. A subset used to
> locate a particular node. The result set of a match is a singleton
> (i.e. a single entity)

Hmm... I wouldn't put it like that. It's true that the syntax of a
pattern is a subset of the syntax of a location path, but a pattern
and an expression do very different things and are used in very
different ways.

A match pattern is like a regular expression -- you test a node
against a match pattern to see if it matches and what you get is
either yes-it-matches or no-it-doesn't-match. You don't get anything
*returned* from a pattern, and a pattern is only relevant if you
already have a node in mind (the node to which you're applying
templates, for example) and you want to see if the pattern matches
that node.

[Taking the analogy with regexps further, there was an interesting
talk at Extreme which touched on the possibility of getting more
detailed information returned from matching on an XSLT pattern in much
the same way as you might get more detailed information returned from
matching on a regexp, about the submatches within the pattern/regexp.]

Cheers,

Jeni

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


 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]