resent from subscribed email address    

>
> I'm sure I'm missing something silly as I'm new to staf/stax
>
> When I try and call a function twice I get the following parse  
> exception:
>
> RC:4001
> Result=Caught com.ibm.staf.service.stax.STAXXMLParseException:
>
> Line 34: The content of element type "function" must match  
> "((function-prolog|function-description)?,function-epilog?,(function- 
> no-args|function-single-arg|function-list-args|function-map-args)?, 
> (timer|parallel|log|call|stafcmd|script|tcstatus|message|iterate| 
> sequence|import|raise|job|process|nop|try|break|testcase| 
> paralleliterate|continue|throw|release|signalhandler|rethrow|block| 
> hold|terminate|return|if|call-with-list|loop|call-with-map))".
>
> Request=STAF local STAX EXECUTE HOLD file :43:/Library/staf/services/ 
> stax/samples/bad.xml
>
> The xml is below. If I remove either of the function calls from  
> "main" the code runs fine.
> with both the calls to run_WriteTest I get the above parse exception.
>
> i.e. this works
>
> <defaultcall function="main"/>
> <function name="main" >
>  <!-- call write test -->
>
>  <call function="'run_WriteTest'"> </call>
>  <!--  <call function="'run_WriteTest'"> </call>  -->
> </function>
> </stax>
>
> but the below does not
>
> Appologies for the formatting I stripped this out to a simple  
> example that exhibits the behavior from a larger file.
>
> What am I missing ?
>
> bob-salmis-computer-3:samples bsalmi$ staf local stax version
> Response
> --------
> 3.3.7
>
>
> Thanks,
> Bob
>
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE stax SYSTEM "stax.dtd">
>
> <stax>
>
> <function name= "run_WriteTest" scope = "local">
>
> <!-- function to call test App -->
> <testcase name ="'testcase 1'">
> <sequence>
> <process name="'bobs process'">
>   <location>'10.211.55.4'</location>
>   <command mode="'shell'">'/bin/ls' </command>
>   <returnstdout/>
> </process>
> <message log="1"> 'STAXResult:\n %s' % (STAXResult[0][1])</message>
> <if expr="RC != 0">
>   <tcstatus result="'fail'"/>
> <else>
>   <tcstatus result="'pass'"/> </else>
> </if>
> </sequence>
> </testcase>
> </function>
>
> <defaultcall function="main"/>
> <function name="main" >
> <!-- call write test -->
>
> <call function="'run_WriteTest'"> </call>
> <call function="'run_WriteTest'"> </call>
> </function>
> </stax>
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to