test525.txml 758 B

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0"?>
  2. <!-- test that <foreach> does a shallow copy, so that modifying the array does not change
  3. the iteration behavior. -->
  4. <scxml conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  5. <datamodel>
  6. <data conf:id="1">
  7. <conf:array123/>
  8. </data>
  9. <data conf:id="2" conf:expr="0"/> <!-- counts the number of iterations -->
  10. </datamodel>
  11. <state id="s0">
  12. <onentry>
  13. <foreach conf:item="3" conf:arrayVar="1">
  14. <conf:extendArray id="1"/>
  15. <conf:incrementID id="2"/>
  16. </foreach>
  17. </onentry>
  18. <transition conf:idVal="2=3" conf:targetpass=""/>
  19. <transition conf:targetfail=""/>
  20. </state>
  21. <conf:pass/>
  22. <conf:fail/>
  23. </scxml>