W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2012

RE: Providing document context to conditional logic

From: <vojtech.toman@emc.com>
Date: Thu, 28 Jun 2012 06:03:26 -0400
To: <xproc-dev@w3.org>
Message-ID: <F3C7EBECE80AC346BE4D1C5A9BB4A41F2ED625A4E5@MX11A.corp.emc.com>

You can use p:xpath-context for that:

<p:pipeline name="main">
  <p:input port="param-doc"/>
      <p:input step="main" port="param-doc"/>
    <p:when test="...">...</p:when>

You can also specify different p:xpath-context on the individual p:when branches if you want.


Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group

From: Tom T [mailto:tomxsllist@hotmail.com]
Sent: Tuesday, June 26, 2012 6:05 PM
To: xproc-dev@w3.org
Subject: Providing document context to conditional logic

I wish to provide parameters to my xproc document in the form of an XML document (presumably this would be passed in via an input port). I then want to make p:choose choices based on the content of that input document.

How do I set the context for any xpaths used to be something other than the default source document?

thanks in advance!
Received on Thursday, 28 June 2012 10:04:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:03 UTC