test557.txml 925 B

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0"?>
  2. <!-- in the ECMA data model, test that if the child of <data> is XML, or if XML is loaded via src=, the processor
  3. assigns it as the value of the var -->
  4. <scxml xmlns="http://www.w3.org/2005/07/scxml"
  5. xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
  6. <datamodel>
  7. <data id="var1">
  8. <books xmlns="">
  9. <book title="title1"/>
  10. <book title="title2"/>
  11. </books>
  12. </data>
  13. <data id="var2" src="file:test557.txt"/>
  14. </datamodel>
  15. <state id="s0">
  16. <transition cond="var1.getElementsByTagName('book')[0].getAttribute('title') == 'title1'" target="s1"/>
  17. <transition conf:targetfail=""/>
  18. </state>
  19. <state id="s1">
  20. <transition cond="var2.getElementsByTagName('book')[1].getAttribute('title') == 'title2'" conf:targetpass=""/>
  21. <transition conf:targetfail=""/>
  22. </state>
  23. <conf:pass/>
  24. <conf:fail/>
  25. </scxml>