Re: Microcomponents, match and select

Grosso, Paul wrote:
> Jeni Tennison wrote:
>> There are some components that must take a select expression because 
>> they contain XPaths that must be evaluated relative to the 
>> context node. 
>>
>> . . .
>>
>> This argues (fairly strongly, I think) for defining options 
>> as patterns rather than expressions.
> 
> What am I missing?

I think you're missing the "In other cases," at the beginning of the 
third paragraph.

To summarise:

1. Options that return values other than nodes must be expressions.
2. Options that identify nodes relative to a non-document context node 
must be expressions.
3. Other options should be patterns.

For example, the 'replace' option on p:string-replace has to be an 
expression both because it returns a string and because it is evaluated 
relative to the node whose value is being replaced. But the option that 
identifies the nodes whose values should be replaced should be a pattern 
(and therefore called match).

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

Received on Friday, 27 April 2007 07:11:19 UTC