toggling the value of an attribute on a substep based on a passed in option

Hi there,
So I'd like to achieve the effect of doing something like the following,
where I pass in dtd-id-idref-warnings as an option and then use the
value of the passed in option to toggle the value of the attribute
dtd-id-idref-warnings: dtd-id-idref-warnings="${dtd-id-idref-warnings}".
But that's clearly the wrong way to do it.

<p:declare-step version="1.0"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:l="http://xproc.org/library"
        type="l:validate-transform"
        name="main">
        <p:option name="dtd-id-idref-warnings" select="'true'"/>

...

<p:validate-with-relax-ng
  name="xmlvalidate"
  assert-valid="true"
  dtd-id-idref-warnings="${dtd-id-idref-warnings}">
  <p:input port="source">
    <p:pipe step="main" port="source"/>
  </p:input>
  <p:input port="schema">
    <p:pipe step="main" port="schema"/>
   </p:input>
</p:validate-with-relax-ng>

I've also tried doing a choose/when with a validate-with-relax-ng in
each branch, but then there are problems with the visibility of the
result port from xmlvalidate.

So what's the right way to achieve this? I could have two complete
different versions of the step, but I was hoping there was a more
elegant way.

Thanks,
David

Received on Saturday, 13 October 2012 14:19:23 UTC