Re: Parameter binding

/ ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
| Consider the following pipeline:
|
|     <p:pipeline xmlns:my="http://www.example.com/mypipe">
|
|      <p:input port="stdin"/>
|      <p:parameter name="my:parm" value="true"/>
|      <p:output port="stdout"/>
|
|      <p:declare-step type="my:xmpl">
|       <p:input port="in"/>
|       <p:parameter name="my:parm" required="yes"/>
|       <p:output port="out"/>
|      </p:declare-step>
|
|      <p:xinclude/>
|
|      <my:xmpl/>
|
|     </p:pipeline>
|
| Is this a valid pipeline or not?

No.

| Where do you look in the spec. to
| get the answer?

http://www.w3.org/XML/XProc/docs/langspec.html#dt-matches

the my:xmpl step doesn't match its signature because it doesn't specify
a value for the required parameter my:parm. You need to say:

  <my:xmpl>
    <p:parameter name="my:parm" select="$my:parm"/>
  </my:xmpl>

or

  <my:xmpl>
    <p:import-parameter name="my:parm"/>
  </my:xmpl>

The fact that value="$my:parm" would do the wrong thing is likely to
be a common error :-(

| Would it make a difference if the two <p:parameter>s used name="parm",
| i.e. no namespace?

No.

The spec could definitely be clearer about this.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Wednesday, 4 April 2007 22:24:00 UTC