Re: Evaluating replace on string-replace

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mozer writes:

> It is not clear to me that from *inside* the p:string-replace, the
> XPath evaluation can see the $opos variable
> . . .
> [[[. . . When a _step_ evaluates an XPath expression . . .]]]

Emphasis added

> . . .
>>    <p:string-replace match="/div/@a"
>>                      replace="concat($opos,',',p:iteration-position())"/>

But $opos is not being evaluated by the step.  That was the whole
problem with the original example.  The 'concat...' XPath expression
is being evaluated by the XProc processor itself, to _construct_ the
expression (in this case, "1,1") which the step will evaluate.  The
_processor_ can see the binding of opos just fine.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
                         Half-time member of W3C Team
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFJEYb/kjnJixAXWBoRAg6YAJ9+Rt88Q2QkOYX0PRoioQCIwUQAFwCfQ1Wy
Yi+oXGqsuBFQTDxlgtPOYPw=
=78Qj
-----END PGP SIGNATURE-----

Received on Wednesday, 5 November 2008 11:44:42 UTC