- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Wed, 06 Jun 2007 15:54:27 +0100
- To: Jeni Tennison <jeni@jenitennison.com>
- Cc: public-xml-processing-model-wg@w3.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeni Tennison writes: > Henry S. Thompson wrote: >> Jeni Tennison writes: >> >>> Really? I don't expect it to work like Henry does at all. The >>> analogous situation in XSLT is: >>> >>> <xsl:apply-templates select="some/element"> >>> <xsl:with-param name="strId" select="@id" /> >>> </xsl:apply-templates> >>> >>> Do you expect $strId to be set based on the id attribute of the >>> element(s) that you apply templates to (some/element), or based on the >>> node that you're on when you do the apply templates? >> I don't see the analogy -- please expand. > > You are processing something (a document in XProc, an element in > XSLT), and passing an argument to the component doing the processing > (a step in XProc, a template in XSLT). In both, there is some context > (a default readable port in XProc, a current node in XSLT) in scope > when the component is invoked. > > In both, the value of the argument is being set using an XPath > expression. In XSLT, the XPath expression is evaluated relative to the > current node (context) when you invoke the template, not the element > that you process with the template. In XProc, I'd expect the XPath > expression to be evaluated relative to the default readable port, not > the documents that you process with the step. I disagree, because I think the analogy is imperfect. The lexical position of the 'argument' setting is telling, it seems to me -- p:option is _inside_ the step (yes, I know the step definition is elsewhere, but it's _so_ elsewhere that your analogy breaks down, IMO). ht - -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, 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) iD8DBQFGZsqjkjnJixAXWBoRAkM2AJ4ucgXYXHsCQBTy14uOk5frO2vmZgCeIYb2 htklOvf4ZJnp0ALSuf9y8jA= =MN97 -----END PGP SIGNATURE-----
Received on Wednesday, 6 June 2007 14:54:44 UTC