W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > June 2007

Re: Context for p:option

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
Message-ID: <f5b7iqhcevw.fsf@hildegard.inf.ed.ac.uk>

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,

- -- 
 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]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Wednesday, 6 June 2007 14:54:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:43 UTC