W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2010

Re: XProc document templates - a question about undeclared variables

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 08 Nov 2010 09:41:16 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m2pquf7u9f.fsf@nwalsh.com>
Philip Fennell <Philip.Fennell@marklogic.com> writes:
> I'd have to say then that the p:document-template, as it is currently
> envisaged, is only of limited value. I believe that, given there's a
> parameters port on this step, the evaluation should be based on those,
> and only those parameters that are available through that port. If you
> cannot find an instance of the parameter in the template then throw an
> exception by all means but don't assume that because you can't find a
> parameter for the context variable in the template that that is
> necessarily an error.

Are you saying that an expression in curly braces that raises an error
when it's evaluated should be left alone?

  ...<example attr1="{3+4}" attr2="{1 div 0}"/>...

should become

  ...<example attr1="7" attr2="{1 div 0}"/>...

?

Uh. Yuck. I don't like that at all.

As I said a moment ago, if you're passing the template result to
XQuery or XSLT, then you can just do all the work in there. The
template step is for the simpler (and in my experience more common and
more easily understood) cases.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
www.marklogic.com

Received on Monday, 8 November 2010 14:41:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 8 November 2010 14:41:52 GMT