Scope?

I wonder if there is an issue here or if this is how things are supposed to
work?

I guess logically I get this error with the following code...

E [Calabash XProc] err:XS0022 : No step named "validate-with-rng" is
visible here. In all cases except the p:output of a compound step, it is a
static error if the port identified by a p:pipe is not in the readable
ports of the step that contains the p:pipe.

    <p:xslt name="schematronOutput" version="1.0">
       ....

    </p:xslt>


 <p:group>
        <p:variable name="cwd" select="/c:directory/@*[namespace-uri()='
http://www.w3.org/XML/1998/namespace' and local-name()='base']"/>
       .....
        <p:exec command="java"    name="validate-with-rng"
   ....

    </p:group>

 <p:pack name="packer" wrapper="document">
        <p:input port="source">
            <p:pipe step="validate-with-rng" port="result"/>
        </p:input>
        <p:input port="alternate">
            <p:pipe step="schematronOutput" port="result"/>
        </p:input>
    </p:pack>


however i no longer get the error as follows and wonder why
step="schematronOutput" is in the readable ports of p:pack when not
included in the same group?



    <!-- validate -->
    <p:xslt name="schematronOutput" version="1.0">
...
    </p:xslt>

    <p:directory-list name="tiger">
        <p:with-option name="path" select="'.'"/>
    </p:directory-list>

    <p:group>
        <p:variable name="cwd" select="/c:directory/@*[namespace-uri()='
http://www.w3.org/XML/1998/namespace' and local-name()='base']"/>

        <p:exec command="java"    name="validate-with-rng"
....
        </p:exec>


  <p:pack name="packer" wrapper="document">
        <p:input port="source">
            <p:pipe step="validate-with-rng" port="result"/>
        </p:input>
        <p:input port="alternate">
            <p:pipe step="schematronOutput" port="result"/>
        </p:input>
    </p:pack>

</p:group>     // moved p:group following packer so no more error...



So then I infer that a scope rule is that what steps occurs before a given
step is in the scope regardless of it not being in a p:group and what after
is not in scope unless in the same p:group?


btw is the need to add a p:group to get p:variable within ones code no
longer going to be required in version next?

probably this was already talked about on the list.. not recalling exactly..

Regards

-- 
Alex Muir
Instructor | Program Organizer - University Technology Student Work
Experience Building
University of the Gambia
http://sites.utg.edu.gm/alex/<https://sites.google.com/a/utg.edu.gm/utsweb/>

Low budget software development benefiting development in the Gambia, West
Africa
Experience of a lifetime, come to Gambia and Join UTSWEB -
http://sites.utg.edu.gm/utsweb/<https://sites.google.com/a/utg.edu.gm/utsweb/>

Received on Wednesday, 18 January 2012 10:32:04 UTC