summaryrefslogtreecommitdiffstats
path: root/test/w3c
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c')
-rwxr-xr-xtest/w3c/check-tests.pl92
-rwxr-xr-xtest/w3c/convert-tests.sh7
-rw-r--r--test/w3c/ecma/test436.scxml23
-rw-r--r--test/w3c/lua/test288.scxml (renamed from test/w3c/xpath/test278.scxml)18
-rw-r--r--test/w3c/lua/test436.scxml15
-rw-r--r--test/w3c/null/test436.scxml (renamed from test/w3c/xpath/test436.scxml)0
-rw-r--r--test/w3c/prolog/test278.scxml23
-rw-r--r--test/w3c/promela/test278.scxml23
-rwxr-xr-xtest/w3c/run_manual_tests.sh127
-rw-r--r--test/w3c/schema/scxml-attribs.xsd57
-rw-r--r--test/w3c/schema/scxml-contentmodels.xsd35
-rw-r--r--test/w3c/schema/scxml-copyright.xsd26
-rw-r--r--test/w3c/schema/scxml-core-strict.xsd425
-rw-r--r--test/w3c/schema/scxml-data-strict.xsd157
-rw-r--r--test/w3c/schema/scxml-datatypes.xsd203
-rw-r--r--test/w3c/schema/scxml-external-strict.xsd168
-rw-r--r--test/w3c/schema/scxml-message.xsd122
-rw-r--r--test/w3c/schema/scxml-messages.xsd49
-rw-r--r--test/w3c/schema/scxml-module-anchor.xsd67
-rw-r--r--test/w3c/schema/scxml-module-core.xsd405
-rw-r--r--test/w3c/schema/scxml-module-data.xsd151
-rw-r--r--test/w3c/schema/scxml-module-external.xsd152
-rw-r--r--test/w3c/schema/scxml-module-script.xsd51
-rw-r--r--test/w3c/schema/scxml-profile-basic.xsd96
-rw-r--r--test/w3c/schema/scxml-profile-ecma.xsd159
-rw-r--r--test/w3c/schema/scxml-profile-minimum.xsd74
-rw-r--r--test/w3c/schema/scxml-profile-xpath.xsd163
-rw-r--r--test/w3c/schema/scxml-strict.xsd88
-rw-r--r--test/w3c/schema/scxml.xsd88
-rw-r--r--test/w3c/schema/xml.xsd117
-rw-r--r--test/w3c/txml/test278.txml2
31 files changed, 3090 insertions, 93 deletions
diff --git a/test/w3c/check-tests.pl b/test/w3c/check-tests.pl
new file mode 100755
index 0000000..7299947
--- /dev/null
+++ b/test/w3c/check-tests.pl
@@ -0,0 +1,92 @@
+#!/usr/bin/perl
+
+use strict;
+use Data::Dumper;
+use XML::Simple;
+
+
+my $manifest = XMLin("./manifest.xml");
+# print Dumper($manifest->{'assert'});
+
+my $perSpecId;
+
+my @allTests;
+my @ecmaTests;
+my @xpathTests;
+my @agnosticTests;
+my @nullTests;
+my @manualTests;
+
+for my $testNr (keys $manifest->{'assert'}) {
+ my @tests;
+ my $thisTest = $manifest->{'assert'}->{$testNr};
+ if (ref($thisTest->{'test'}->{'start'}) eq "ARRAY") {
+ push (@tests, @{$thisTest->{'test'}->{'start'}});
+ } else {
+ push (@tests, $thisTest->{'test'}->{'start'});
+ }
+ $perSpecId->{$thisTest->{'specnum'}.':'.$thisTest->{'specid'}}->{'total'} += @tests;
+ if ($thisTest->{'test'}->{'manual'} eq "true") {
+ $perSpecId->{$thisTest->{'specnum'}.':'.$thisTest->{'specid'}}->{'manual'} += @tests;
+ push @manualTests, @tests;
+
+ }
+
+ if ($thisTest->{'specid'} eq "#minimal-profile" || $thisTest->{'specid'} !~ /profile$/) {
+ push @nullTests, @tests;
+ }
+
+ if ($thisTest->{'specid'} eq "#ecma-profile" || $thisTest->{'specid'} !~ /profile$/) {
+ push @ecmaTests, @tests;
+ }
+
+ if ($thisTest->{'specid'} eq "#xpath-profile" || $thisTest->{'specid'} !~ /profile$/) {
+ push @xpathTests, @tests;
+ }
+
+ push (@allTests, @tests);
+ push @agnosticTests, @tests if ($thisTest->{'specid'} !~ /profile$/);
+}
+
+# print Dumper(@ecmaTests);
+
+my %datamodels = (
+ "ecma" => \@ecmaTests,
+ "xpath" => \@xpathTests,
+ "promela" => \@agnosticTests,
+ "prolog" => \@agnosticTests,
+ "lua" => \@ecmaTests
+);
+
+for my $datamodel (keys %datamodels) {
+ # every scxml file is a test
+ for (`ls $datamodel/*.scxml`) {
+ my $filename = $_;
+ chomp($filename);
+ if ($filename =~ /\/test(\d+\w?)\.scxml/) {
+ print("${filename} is not in mainfest\n") if (! grep $_->{'uri'} == "${1}/test${1}.scxml", @{$datamodels{$datamodel}});
+ }
+ }
+ # every test is given
+ for my $testURI (@{$datamodels{$datamodel}}) {
+ if ($testURI->{'uri'} =~ /^(\d+)\/(test\d+\w?)\.(txt|txml)$/) {
+ my $name = $2;
+ my $suffix = ($3 eq "txml" ? "scxml" : $3);
+ if (! -e "${datamodel}/${name}.${suffix}") {
+ print("${datamodel}/${name}.${suffix} is missing\n");
+ }
+ } else {
+ die ($testURI->{'uri'});
+ }
+ }
+}
+
+# print Dumper(@manualTests);
+
+print "NULL : ".@nullTests."\n";
+print "ECMA : ".@ecmaTests."\n";
+print "XPATH: ".@xpathTests."\n";
+print "\n";
+print "MAN : ".@manualTests."\n";
+print "ANY : ".@agnosticTests."\n";
+print "TOTAL: ".@allTests."\n";
diff --git a/test/w3c/convert-tests.sh b/test/w3c/convert-tests.sh
index e784a44..0e43b48 100755
--- a/test/w3c/convert-tests.sh
+++ b/test/w3c/convert-tests.sh
@@ -50,6 +50,13 @@ find ./prolog -type f -exec grep -Ili 'datamodel="xpath"' {} \; |xargs rm -fv
find ./prolog -type f -exec grep -Ili 'datamodel="ecmascript"' {} \; |xargs rm -fv
find ./prolog -type f -exec grep -Ili 'datamodel="null"' {} \; |xargs rm -fv
+# test436 is the null datamodel
+mv ./ecma/test436.scxml ./null
+rm ./xpath/test436.scxml
+rm ./promela/test436.scxml
+rm ./prolog/test436.scxml
+rm ./lua/test436.scxml
+
# format all SCXML files
SCXMLS=`find . -type f -name '*.scxml'`
for SCXML in $SCXMLS
diff --git a/test/w3c/ecma/test436.scxml b/test/w3c/ecma/test436.scxml
deleted file mode 100644
index 072370e..0000000
--- a/test/w3c/ecma/test436.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- test that in() predicate works in null data model -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="null" version="1.0" initial="p">
- <parallel id="p">
- <state id="ps0">
- <transition cond="In('s1')" target="fail"/>
- <transition cond="In('ps1')" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="ps1"/>
- </parallel>
- <state id="s1"/>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/xpath/test278.scxml b/test/w3c/lua/test288.scxml
index 09ad31b..5f44351 100644
--- a/test/w3c/xpath/test278.scxml
+++ b/test/w3c/lua/test288.scxml
@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
- <!-- test that a variable can be accessed from a state that is outside its lexical scope -->
+<!-- a simple test that a legal value may be assigned to a valid data model location
+using child content -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" datamodel="lua" version="1.0" initial="s0">
+ <datamodel>
+ <data id="Var1" expr="0"/>
+ </datamodel>
<state id="s0">
- <transition cond="$Var1/text() =1" target="pass"/>
+ <onentry>
+ <assign location="Var1">123</assign>
+ </onentry>
+ <transition cond="Var1 == 123" target="pass"/>
<transition target="fail"/>
</state>
- <state id="s1">
- <datamodel>
- <data id="Var1" expr="1"/>
- </datamodel>
- </state>
<final id="pass">
<onentry>
<log label="Outcome" expr="'pass'"/>
diff --git a/test/w3c/lua/test436.scxml b/test/w3c/lua/test436.scxml
deleted file mode 100644
index da5f5a6..0000000
--- a/test/w3c/lua/test436.scxml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- test that in() predicate works in null data model -->
-<scxml xmlns="http://www.w3.org/2005/07/scxml" datamodel="null" version="1.0" initial="p">
- <parallel id="p">
- <state id="ps0">
- <transition cond="In('s1')" target="fail"/>
- <transition cond="In('ps1')" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="ps1"/>
- </parallel>
- <state id="s1"/>
- <final id="pass"/>
- <final id="fail"/>
-</scxml>
diff --git a/test/w3c/xpath/test436.scxml b/test/w3c/null/test436.scxml
index 072370e..072370e 100644
--- a/test/w3c/xpath/test436.scxml
+++ b/test/w3c/null/test436.scxml
diff --git a/test/w3c/prolog/test278.scxml b/test/w3c/prolog/test278.scxml
deleted file mode 100644
index 11cae5b..0000000
--- a/test/w3c/prolog/test278.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="prolog">
- <!-- test that a variable can be accessed from a state that is outside its lexical scope -->
- <state id="s0">
- <transition cond="X = 1, var1(X)" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <datamodel>
- <data id="var1" expr="1"/>
- </datamodel>
- </state>
- <final id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/promela/test278.scxml b/test/w3c/promela/test278.scxml
deleted file mode 100644
index a2d613a..0000000
--- a/test/w3c/promela/test278.scxml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="promela">
- <!-- test that a variable can be accessed from a state that is outside its lexical scope -->
- <state id="s0">
- <transition cond="Var1==1" target="pass"/>
- <transition target="fail"/>
- </state>
- <state id="s1">
- <datamodel>
- <data id="Var1" type="int" expr="1"/>
- </datamodel>
- </state>
- <final xmlns:scxml="http://www.w3.org/2005/07/scxml" id="pass">
- <onentry>
- <log label="Outcome" expr="'pass'"/>
- </onentry>
- </final>
- <final xmlns:scxml="http://www.w3.org/2005/07/scxml" id="fail">
- <onentry>
- <log label="Outcome" expr="'fail'"/>
- </onentry>
- </final>
-</scxml>
diff --git a/test/w3c/run_manual_tests.sh b/test/w3c/run_manual_tests.sh
new file mode 100755
index 0000000..8744423
--- /dev/null
+++ b/test/w3c/run_manual_tests.sh
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+USCXML_BIN=$1;
+DATA_MODEL=$2;
+
+echo
+echo
+echo "---- test178.scxml: --------"
+echo "we test that multiple key/value pairs are included, even when the keys are the"
+echo "same. This is a manual test. The tester must look at the log output and verify"
+echo "that both keys are there. (This test uses the SCXML Event I/O processor, which"
+echo "is the only one that all platforms must support. It does not specify the"
+echo "message format, so we cannot test _event.raw directly. Therefore we print it"
+echo "out for visual inspection"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test178.scxml
+
+
+echo
+echo
+echo "---- test230.scxml: --------"
+echo "a manual test that an autofowarded event has the same fields and values as the"
+echo "original event. the child process sends the parent process an event which is"
+echo "forwarded back to it. Both the parent and child process print out the contents"
+echo "of the event. The tester must check if they are the same and report his result."
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test230.scxml
+
+
+echo
+echo
+echo "---- test250.scxml: --------"
+echo "test that the onexit handlers run in the invoked process if it is cancelled."
+echo "This has to be a manual test, since this process won't accept any events from"
+echo "the child process once it has been cancelled. Tester must examine log output"
+echo "from child process to determine success"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test250.scxml
+
+
+echo
+echo
+echo "---- test301.scxml: --------"
+echo "the processor should reject this document because it can't download the script."
+echo "Therefore we fail if it runs at all. This test is valid only for datamodels"
+echo "that support scripting"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test301.scxml
+
+
+echo
+echo
+echo "---- test307.scxml: --------"
+echo "with binding=late, in s0 we access a variable that isn't created until we get"
+echo "to s1. Then in s1 we access a non-existent substructure of a variable. We use"
+echo "log tags to report the values that both operations yield, and whether there are"
+echo "errors. This is a manual test, since the tester must report whether the output"
+echo "is the same in the two cases"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test307.scxml
+
+
+echo
+echo
+echo "---- test313.scxml: --------"
+echo "this is a manual test. The processor is allowed to reject this doc, but if it"
+echo "executes it with its illegal expression, it must raise an error"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test313.scxml
+
+
+echo
+echo
+echo "---- test314.scxml: --------"
+echo "this is a manual test because the processor is allowed to reject this document."
+echo "But if it executes it, it should not raise an error until it gets to s03 and"
+echo "evaluates the illegal expr"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test314.scxml
+
+
+echo
+echo
+echo "---- test415.scxml: --------"
+
+echo "Test that the state machine halts when it enters a top-level final state. Since"
+echo "the initial state is a final state, this machine should halt immediately"
+echo "without processing \"event1\" which is raised in the final state's on-entry"
+echo "handler. This is a manual test since there is no platform-independent way to"
+echo "test that event1 is not processed"
+echo
+
+$USCXML_BIN -v ${DATA_MODEL}/test415.scxml
+
+
+echo
+echo
+echo "---- test513.scxml: --------"
+
+echo "This is a fully manual test. You send a well formed event to the 'location' URL"
+echo "specified for your SCXML interpreter and check that you get a 200 response code"
+echo "back. One way of doing this, using wget, is shown below (you can use any event"
+echo "name you want, but you must use '_scxmleventname' to indicate the name of the"
+echo "event)"
+echo
+
+cat << 'END_TEST513' > /tmp/test513.scxml
+<scxml name="test513">
+ <state id="idle">
+ <transition event="quit" target="done" />
+ </state>
+ <final id="done" />
+</scxml>
+END_TEST513
+
+${USCXML_BIN} -v -t35001 /tmp/test513.scxml &
+sleep 1
+
+wget --post-data='key1=value1&key2=value2' --header '_scxmleventname: quit' localhost:35001/test513/basichttp
+rm basichttp*
diff --git a/test/w3c/schema/scxml-attribs.xsd b/test/w3c/schema/scxml-attribs.xsd
new file mode 100644
index 0000000..2459592
--- /dev/null
+++ b/test/w3c/schema/scxml-attribs.xsd
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema common attributes for SCXML
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The module itself does not provide the schemaLocation
+ and expects the driver schema to provide the
+ actual SchemaLocation.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This include brings in the SCXML datatypes.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:attributeGroup name="Fetchtimeout.attrib">
+ <xsd:annotation>
+ <xsd:documentation>Used in Cache.attribs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="fetchtimeout" type="Duration.datatype"/>
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="Maxage.attrib">
+ <xsd:annotation>
+ <xsd:documentation>Used in Cache.attribs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="maxage" type="Integer.datatype"/>
+ </xsd:attributeGroup>
+ <xsd:attributeGroup name="Maxstale.attrib">
+ <xsd:annotation>
+ <xsd:documentation>Used in Cache attribs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="maxstale" type="Integer.datatype"/>
+ </xsd:attributeGroup>
+
+ <xsd:attributeGroup name="Cache.attribs">
+ <xsd:annotation>
+ <xsd:documentation>Cache attributes to control caching behavior</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attributeGroup ref="Fetchtimeout.attrib"/>
+ <xsd:attributeGroup ref="Maxage.attrib"/>
+ <xsd:attributeGroup ref="Maxstale.attrib"/>
+ </xsd:attributeGroup>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-contentmodels.xsd b/test/w3c/schema/scxml-contentmodels.xsd
new file mode 100644
index 0000000..2850c3a
--- /dev/null
+++ b/test/w3c/schema/scxml-contentmodels.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ XML Schema content models for SCXML
+ * scxml.extra.content
+ * content
+ * scxml.extra.attribs
+ Defines SCXML shared content models.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:attributeGroup name="scxml.extra.attribs">
+ <xsd:annotation>
+ <xsd:documentation>group allowing attributes from other namespaces</xsd:documentation>
+ </xsd:annotation>
+ <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxml.extra.content">
+ <xsd:annotation>
+ <xsd:documentation>
+ group allowing elements from other namespaces
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-copyright.xsd b/test/w3c/schema/scxml-copyright.xsd
new file mode 100644
index 0000000..e322051
--- /dev/null
+++ b/test/w3c/schema/scxml-copyright.xsd
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema for SCXML 1.0, formulated as a modular XML application
+ Copyright &#169;1998-2007 World Wide Web Consortium
+ (Massachusetts Institute of Technology, European Research Consortium
+ for Informatics and Mathematics, Keio University).
+ All Rights Reserved.
+
+ Permission to use, copy, modify and distribute the SCXML Schema
+ modules and their accompanying xs:documentation for any purpose
+ and without fee is hereby granted in perpetuity, provided that the above
+ copyright notice and this paragraph appear in all copies.
+ The copyright holders make no representation about the suitability of
+ these XML Schema modules for any purpose.
+
+ They are provided "as is" without expressed or implied warranty.
+ </xsd:documentation>
+ </xsd:annotation>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-core-strict.xsd b/test/w3c/schema/scxml-core-strict.xsd
new file mode 100644
index 0000000..b54cf8e
--- /dev/null
+++ b/test/w3c/schema/scxml-core-strict.xsd
@@ -0,0 +1,425 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema core module for SCXML
+ * scxml
+ * state
+ * initial
+ * onexit
+ * onentry
+ * transition
+ * parallel
+ * final
+ * history
+ * donedata
+ * if
+ * elsif
+ * else
+ * foreach
+ * raise
+ * log
+ The core module defines these elements and the
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML datatypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML attributes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+
+ <!-- scxml -->
+ <xsd:attributeGroup name="scxml.scxml.attlist">
+ <xsd:attribute name="initial" type="xsd:IDREFS"/>
+ <xsd:attribute name="name" type="xsd:NMTOKEN"/>
+ <xsd:attribute name="version" type="xsd:decimal" use="required" fixed="1.0"/>
+ <xsd:attribute name="datamodel" type="xsd:NMTOKEN" default="null" use="optional"/>
+ <xsd:attribute name="binding" type="Binding.datatype"/>
+ <xsd:attribute name="exmode" type="Exmode.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.scxml.mix">
+ <xsd:choice>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.scxml.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.scxml.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.scxml.type">
+ <xsd:group ref="scxml.scxml.content"/>
+ <xsd:attributeGroup ref="scxml.scxml.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="scxml" type="scxml.scxml.type"/>
+
+ <!-- state -->
+ <xsd:attributeGroup name="scxml.state.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="initial" type="xsd:IDREFS"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.state.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="initial" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.state.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.state.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.state.type">
+ <xsd:sequence>
+ <xsd:group ref="scxml.state.content"/>
+ </xsd:sequence>
+ <xsd:attributeGroup ref="scxml.state.attlist"/>
+ <xsd:assert test="not(@initial and initial)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="if(@initial or initial) then (state | parallel) else true()" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="every $init in @initial satisfies (some $state in (.//state | .//parallel) satisfies ($state/@id = $init))" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="if (initial) then (every $targ in initial/transition/@target satisfies (some $state in (.//state | .//parallel) satisfies ($state/@id = $targ))) else true()" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="if(history/@type='shallow') then (every $targ in history/transition/@target satisfies
+ (some $state in (state |parallel) satisfies ($state/@id = $targ)))
+ else if (history/@type='deep') then (every $targ in history/transition/@target satisfies
+ (some $state in (.//state | .//parallel) satisfies ($state/@id = $targ)))
+ else true()" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="state" type="scxml.state.type"/>
+
+ <!-- initial -->
+ <xsd:attributeGroup name="scxml.initial.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.initial.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.initial.type">
+ <xsd:group ref="scxml.initial.content"/>
+ <xsd:attributeGroup ref="scxml.initial.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="initial" type="scxml.initial.type"/>
+
+ <!-- onentry -->
+ <xsd:attributeGroup name="scxml.onentry.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.onentry.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.onentry.type">
+ <xsd:group ref="scxml.onentry.content"/>
+ <xsd:attributeGroup ref="scxml.onentry.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="onentry" type="scxml.onentry.type"/>
+
+ <!-- onexit -->
+ <xsd:attributeGroup name="scxml.onexit.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.onexit.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.onexit.type">
+ <xsd:group ref="scxml.onexit.content"/>
+ <xsd:attributeGroup ref="scxml.onexit.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="onexit" type="scxml.onexit.type"/>
+
+ <!-- transition -->
+ <xsd:attributeGroup name="scxml.transition.attlist">
+ <xsd:attribute name="event" type="EventTypes.datatype"/>
+ <xsd:attribute name="cond" type="CondLang.datatype"/>
+ <xsd:attribute name="target" type="xsd:IDREFS"/>
+ <xsd:attribute name="type" type="TransitionType.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.transition.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.transition.type">
+ <xsd:group ref="scxml.transition.content"/>
+ <xsd:attributeGroup ref="scxml.transition.attlist"/>
+ <xsd:assert test="(@event or @cond or @target)" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="transition" type="scxml.transition.type"/>
+
+ <!-- parallel -->
+ <xsd:attributeGroup name="scxml.parallel.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.parallel.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.parallel.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.parallel.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.parallel.type">
+ <xsd:group ref="scxml.parallel.content"/>
+ <xsd:attributeGroup ref="scxml.parallel.attlist"/>
+ <xsd:assert test="if(history/@type='shallow') then (every $targ in history/transition/@target satisfies
+ (some $state in (state |parallel) satisfies ($state/@id = $targ)))
+ else if (history/@type='deep') then (every $targ in history/transition/@target satisfies
+ (some $state in (.//state | .//parallel) satisfies ($state/@id = $targ)))
+ else true()" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="parallel" type="scxml.parallel.type"/>
+
+ <!-- final -->
+ <xsd:attributeGroup name="scxml.final.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.final.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="donedata" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.final.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.final.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.final.type">
+ <xsd:group ref="scxml.final.content"/>
+ <xsd:attributeGroup ref="scxml.final.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="final" type="scxml.final.type"/>
+
+ <!-- history -->
+ <xsd:attributeGroup name="scxml.history.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="type" type="HistoryType.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.history.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.history.type">
+ <xsd:group ref="scxml.history.content"/>
+ <xsd:attributeGroup ref="scxml.history.attlist"/>
+ <xsd:assert test="not(transition/@cond or transition/@event)" xpathDefaultNamespace="##targetNamespace"/>
+
+ </xsd:complexType>
+ <xsd:element name="history" type="scxml.history.type"/>
+
+
+
+ <!-- donedata -->
+ <xsd:attributeGroup name="scxml.donedata.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.donedata.content">
+ <xsd:sequence>
+ <xsd:choice>
+ <xsd:element ref="content" minOccurs="1" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="1" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.donedata.type">
+ <xsd:group ref="scxml.donedata.content"/>
+ <xsd:attributeGroup ref="scxml.donedata.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="donedata" type="scxml.donedata.type"/>
+
+ <!-- if -->
+ <xsd:attributeGroup name="scxml.if.attlist">
+ <xsd:attribute name="cond" type="CondLang.datatype" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.if.elseif.mix">
+ <xsd:sequence>
+ <xsd:element ref="elseif" />
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.if.else.mix">
+ <xsd:sequence>
+ <xsd:element ref="else" />
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.if.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.if.elseif.mix" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.if.else.mix" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.if.type">
+ <xsd:group ref="scxml.if.content"/>
+ <xsd:attributeGroup ref="scxml.if.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="if" type="scxml.if.type"/>
+
+ <!-- elseif -->
+ <xsd:attributeGroup name="scxml.elseif.attlist">
+ <xsd:attribute name="cond" type="CondLang.datatype" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.elseif.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.elseif.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.elseif.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.elseif.type">
+ <xsd:group ref="scxml.elseif.content"/>
+ <xsd:attributeGroup ref="scxml.elseif.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="elseif" type="scxml.elseif.type"/>
+
+ <!-- else -->
+ <xsd:attributeGroup name="scxml.else.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.else.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.else.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.else.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.else.type">
+ <xsd:group ref="scxml.else.content"/>
+ <xsd:attributeGroup ref="scxml.else.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="else" type="scxml.else.type"/>
+
+ <!-- foreach -->
+ <xsd:attributeGroup name="scxml.foreach.attlist">
+ <xsd:attribute name="array" type="ValueLang.datatype" use="required"/>
+ <xsd:attribute name="item" type="xsd:string" use="required"/>
+ <xsd:attribute name="index" type="xsd:string"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.foreach.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.foreach.type">
+ <xsd:group ref="scxml.foreach.content"/>
+ <xsd:attributeGroup ref="scxml.foreach.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="foreach" type="scxml.foreach.type"/>
+
+ <!-- raise -->
+ <xsd:attributeGroup name="scxml.raise.attlist">
+ <xsd:attribute name="event" type="xsd:NMTOKEN" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.raise.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.raise.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.raise.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.raise.type">
+ <xsd:group ref="scxml.raise.content"/>
+ <xsd:attributeGroup ref="scxml.raise.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="raise" type="scxml.raise.type"/>
+
+ <!-- log -->
+ <xsd:attributeGroup name="scxml.log.attlist">
+ <xsd:attribute name="label" type="xsd:string"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.log.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.log.type">
+ <xsd:group ref="scxml.log.content"/>
+ <xsd:attributeGroup ref="scxml.log.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="log" type="scxml.log.type"/>
+
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-data-strict.xsd b/test/w3c/schema/scxml-data-strict.xsd
new file mode 100644
index 0000000..39a834d
--- /dev/null
+++ b/test/w3c/schema/scxml-data-strict.xsd
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema data module for SCXML
+ * datamodel
+ * data
+ * assign
+ * param
+ * script
+ * content
+ The data module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines SCXML Attribute DataTypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <!-- datamodel -->
+ <xsd:attributeGroup name="scxml.datamodel.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.datamodel.content">
+ <xsd:sequence>
+ <xsd:element ref="data" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.datamodel.type">
+ <xsd:group ref="scxml.datamodel.content"/>
+ <xsd:attributeGroup ref="scxml.datamodel.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="datamodel" type="scxml.datamodel.type"/>
+
+ <!-- data -->
+ <xsd:attributeGroup name="scxml.data.attlist">
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.data.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.data.type" mixed="true">
+ <xsd:group ref="scxml.data.content"/>
+ <xsd:attributeGroup ref="scxml.data.attlist"/>
+ <xsd:assert test="not(@src and @expr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="if(@src or @expr) then (not(text() | *)) else true()" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="data" type="scxml.data.type"/>
+
+
+
+ <!-- param -->
+ <xsd:attributeGroup name="scxml.param.attlist">
+ <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attribute name="location" type="LocLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.param.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.param.type">
+ <xsd:group ref="scxml.param.content"/>
+ <xsd:attributeGroup ref="scxml.param.attlist"/>
+ <xsd:assert test="(@expr or @location) and not(@expr and @location)" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="param" type="scxml.param.type"/>
+
+<!-- assign -->
+ <xsd:attributeGroup name="scxml.assign.attlist">
+ <xsd:attribute name="location" type="LocLang.datatype" use="required"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attribute name="type" type="AssignType.datatype" default="replacechildren"/>
+ <xsd:attribute name="attr" type="xsd:NMTOKEN"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.assign.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.assign.type" mixed="true">
+ <xsd:group ref="scxml.assign.content"/>
+ <xsd:attributeGroup ref="scxml.assign.attlist"/>
+ <xsd:assert test="(@expr or text() or *)" xpathDefaultNamespace="##targetNamespace"/>
+<xsd:assert test="not(@expr and (text() | *))" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="assign" type="scxml.assign.type"/>
+
+
+<!-- script -->
+ <xsd:attributeGroup name="scxml.script.attlist">
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.script.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.script.type" mixed="true">
+ <xsd:group ref="scxml.script.content"/>
+ <xsd:attributeGroup ref="scxml.script.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="script" type="scxml.script.type"/>
+
+ <!-- content -->
+ <xsd:attributeGroup name="scxml.content.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.content.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.content.type" mixed="true">
+ <xsd:group ref="scxml.content.content"/>
+ <xsd:attributeGroup ref="scxml.content.attlist"/>
+ <xsd:assert test="not(@expr and (text() or *))" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="content" type="scxml.content.type"/>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-datatypes.xsd b/test/w3c/schema/scxml-datatypes.xsd
new file mode 100644
index 0000000..7771084
--- /dev/null
+++ b/test/w3c/schema/scxml-datatypes.xsd
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ XML Schema datatypes for SCXML
+
+ Defines containers for the SCXML datatypes, many of these
+ imported from other specifications and standards.
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:simpleType name="Exmode.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Describes the processor execution mode for this document, being
+ either "lax" or "strict".
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="lax"/>
+ <xsd:enumeration value="strict"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Binding.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ The binding type in use for the SCXML document.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="early"/>
+ <xsd:enumeration value="late"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="HistoryType.datatype">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="shallow"/>
+ <xsd:enumeration value="deep"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TransitionType.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ The type of the transition i.e. internal or external.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="internal"/>
+ <xsd:enumeration value="external"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Boolean.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Boolean: true or false only
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKENS">
+ <xsd:enumeration value="true"/>
+ <xsd:enumeration value="false"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="AssignType.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ The assign type that allows for precise manipulation of the
+ datamodel location. Types are:
+ replacechildren (default),
+ firstchild, lastchild,
+ previoussibling, nextsibling,
+ replace, delete,
+ addattribute
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="replacechildren"/>
+ <xsd:enumeration value="firstchild"/>
+ <xsd:enumeration value="lastchild"/>
+ <xsd:enumeration value="previoussibling"/>
+ <xsd:enumeration value="nextsibling"/>
+ <xsd:enumeration value="replace"/>
+ <xsd:enumeration value="delete"/>
+ <xsd:enumeration value="addattribute"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="URI.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ The xsd:anyURI type and thus URI references in SCXML
+ documents may contain a wide array of international
+ characters. Implementers should reference RFC 3987 and
+ the "Character Model for the World Wide Web 1.0:
+ Resource Identifiers" in order to provide appropriate
+ support for these characters in VoiceXML documents and
+ when processing values of this type or mapping them to
+ URIs.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:anyURI"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Integer.datatype">
+ <xsd:annotation>
+ <xsd:documentation>Non-negative integer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:nonNegativeInteger"/>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Duration.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Duration allowing positive values ranging from milliseconds
+ to days.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="\d*(\.\d+)?(ms|s|m|h|d)"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+
+ <xsd:simpleType name="EventType.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ EventType is the name of an event.
+ Example legal values:
+ foo
+ foo.bar
+ foo.bar.baz
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="(\i|\d|\-)+(\.(\i|\d|\-)+)*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="EventTypes.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Custom datatype for the event attribute in SCXML based on xsd:token.
+ Example legal values:
+ *
+ foo
+ foo.bar
+ foo.*
+ foo.bar.*
+ foo bar baz
+ foo.bar bar.* baz.foo.*
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="\.?\*|(\i|\d|\-)+(\.(\i|\d|\-)+)*(\.\*)?(\s(\i|\d|\-)+(\.(\i|\d|\-)+)*(\.\*)?)*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- Defines the default CondLang datatype. -->
+ <xsd:simpleType name="CondLang.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Conditional language is expression
+ which must evaluate to Boolean True or False.
+ The expression language must define In(stateID)
+ as a valid expression.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+ <!-- Defines the default LocLang datatype. -->
+ <xsd:simpleType name="LocLang.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Location language is expression
+ identifying a location in the datamodel.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+ <!-- Defines the default ValueLang datatype. -->
+ <xsd:simpleType name="ValueLang.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Value language is expression
+ return a value.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-external-strict.xsd b/test/w3c/schema/scxml-external-strict.xsd
new file mode 100644
index 0000000..6219b7b
--- /dev/null
+++ b/test/w3c/schema/scxml-external-strict.xsd
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema external module for SCXML
+ * send
+ * cancel
+ * invoke
+ * finalize
+ The external module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines SCXML Attribute DataTypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+<!-- send -->
+ <xsd:attributeGroup name="scxml.send.attlist">
+ <xsd:attribute name="event" type="EventType.datatype"/>
+ <xsd:attribute name="eventexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="target" type="URI.datatype"/>
+ <xsd:attribute name="targetexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="type" type="xsd:string" default="scxml"/>
+ <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="idlocation" type="LocLang.datatype"/>
+ <xsd:attribute name="delay" type="Duration.datatype" default="0s"/>
+ <xsd:attribute name="delayexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="namelist" type="xsd:string"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.send.mix">
+ <xsd:choice>
+ <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.send.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.send.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.send.type">
+ <xsd:group ref="scxml.send.content"/>
+ <xsd:attributeGroup ref="scxml.send.attlist"/>
+ <xsd:assert test="(@event or @eventexpr or content) and not(@expr and @eventexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="not(@namelist and (param | content))" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="not(@target and @targetexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="not(@id and @idlocation)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="not(@type and @typeexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="not(@delay and @delayexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test="if(@delay or @delayexpr) then (not(@target eq '_internal')) else true()" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="send" type="scxml.send.type"/>
+
+ <!-- cancel -->
+ <xsd:attributeGroup name="scxml.cancel.attlist">
+ <xsd:attribute name="sendid" type="xsd:IDREF"/>
+ <xsd:attribute name="sendidexpr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.cancel.mix">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.cancel.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.cancel.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.cancel.type">
+ <xsd:group ref="scxml.cancel.content"/>
+ <xsd:attributeGroup ref="scxml.cancel.attlist"/>
+ <xsd:assert test="(@sendid or @sendidexpr) and not(@sendid and @sendidexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="cancel" type="scxml.cancel.type"/>
+
+
+
+ <!-- invoke -->
+ <xsd:attributeGroup name="scxml.invoke.attlist">
+ <xsd:attribute name="type" type="xsd:string" default="scxml"/>
+ <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attribute name="srcexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="idlocation" type="LocLang.datatype"/>
+ <xsd:attribute name="namelist" type="xsd:string"/>
+ <xsd:attribute name="autoforward" type="Boolean.datatype" use="optional" default="false"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.invoke.mix">
+ <xsd:sequence>
+ <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="finalize" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.invoke.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.invoke.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.invoke.type">
+ <xsd:group ref="scxml.invoke.content"/>
+ <xsd:attributeGroup ref="scxml.invoke.attlist"/>
+ <xsd:assert test=" not(@type and @typeexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not(@src and @srcexpr)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not((@src or @srcexpr) and (content | param))" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not(@id and @idlocation)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not(@namelist and param)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not(param and content)" xpathDefaultNamespace="##targetNamespace"/>
+ <xsd:assert test=" not(content[2])" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="invoke" type="scxml.invoke.type"/>
+
+ <!-- finalize -->
+ <xsd:attributeGroup name="scxml.finalize.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.finalize.mix">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.finalize.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.finalize.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.finalize.type">
+ <xsd:group ref="scxml.finalize.content"/>
+ <xsd:attributeGroup ref="scxml.finalize.attlist"/>
+ <xsd:assert test=" not(send | raise)" xpathDefaultNamespace="##targetNamespace"/>
+ </xsd:complexType>
+ <xsd:element name="finalize" type="scxml.finalize.type"/>
+
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-message.xsd b/test/w3c/schema/scxml-message.xsd
new file mode 100644
index 0000000..de4b4b8
--- /dev/null
+++ b/test/w3c/schema/scxml-message.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ XML Schema for sending messages to SCXML processors.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ XML Schema for sending messages to SCXML processors.
+ Version 1.0
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd" />
+ </xsd:annotation>
+
+ <xsd:attributeGroup name="scxmlmessage.extra.attribs">
+ <xsd:annotation>
+ <xsd:documentation>
+ Group allowing attributes from other namespaces
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:attributeGroup>
+
+ <xsd:attributeGroup name="scxmlmessage.message.attlist">
+ <xsd:attribute name="version" type="xsd:string" fixed="1.0" use="required" />
+ <xsd:attribute name="source" type="xsd:anyURI" use="required" />
+ <xsd:attribute name="target" type="xsd:anyURI" use="required" />
+ <xsd:attribute name="sendid" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ Non SCXML senders are not required to specify a sendid
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="name" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defaults to "external.event"
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="sourcetype" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ Defaults to "scxml"
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attributeGroup ref="scxmlmessage.extra.attribs" />
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxmlmessage.message.content">
+ <xsd:sequence>
+ <xsd:element ref="payload" minOccurs="1" maxOccurs="1" />
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="scxmlmessage.message.type">
+ <xsd:group ref="scxmlmessage.message.content" />
+ <xsd:attributeGroup ref="scxmlmessage.message.attlist" />
+ </xsd:complexType>
+
+ <xsd:element name="message" type="scxmlmessage.message.type" />
+
+ <xsd:attributeGroup name="scxmlmessage.payload.attlist">
+ <xsd:attributeGroup ref="scxmlmessage.extra.attribs" />
+ <xsd:attribute name="contenttype" type="xsd:string" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ The mime type of the child content.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxmlmessage.payload.content">
+ <xsd:choice>
+ <xsd:sequence>
+ <xsd:element ref="property" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:sequence>
+ <xsd:any namespace="##other" minOccurs="1"
+ maxOccurs="unbounded" processContents="lax" />
+ </xsd:sequence>
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="scxmlmessage.payload.type">
+ <xsd:group ref="scxmlmessage.payload.content" />
+ <xsd:attributeGroup ref="scxmlmessage.payload.attlist" />
+ </xsd:complexType>
+
+ <xsd:element name="payload" type="scxmlmessage.payload.type" />
+
+ <xsd:attributeGroup name="scxmlmessage.property.attlist">
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attributeGroup ref="scxmlmessage.extra.attribs" />
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxmlmessage.property.content">
+ <xsd:sequence>
+ <xsd:element ref="hint" minOccurs="0"
+ maxOccurs="1" />
+ <xsd:any namespace="##other" minOccurs="0"
+ maxOccurs="unbounded" processContents="skip" />
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="scxmlmessage.property.type" mixed="true">
+ <xsd:group ref="scxmlmessage.property.content" />
+ <xsd:attributeGroup ref="scxmlmessage.property.attlist" />
+ </xsd:complexType>
+
+ <xsd:element name="property" type="scxmlmessage.property.type" />
+
+ <xsd:element name="hint" type="xsd:string" />
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-messages.xsd b/test/w3c/schema/scxml-messages.xsd
new file mode 100644
index 0000000..922bc57
--- /dev/null
+++ b/test/w3c/schema/scxml-messages.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ XML Schema for sending messages to SCXML processors.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:include schemaLocation="scxml-message.xsd"/>
+
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ XML Schema for sending messages to SCXML processors.
+ Version 1.0
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd" />
+ </xsd:annotation>
+
+ <xsd:attributeGroup name="scxmlmessages.extra.attribs">
+ <xsd:annotation>
+ <xsd:documentation>
+ Group allowing attributes from other namespaces
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:attributeGroup>
+
+ <xsd:attributeGroup name="scxmlmessages.messages.attlist">
+ <xsd:attribute name="version" type="xsd:string" fixed="1.0"
+ use="required" />
+ <xsd:attributeGroup ref="scxmlmessages.extra.attribs" />
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxmlmessages.messages.content">
+ <xsd:sequence>
+ <xsd:element ref="message" minOccurs="1"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="scxmlmessages.messages.type">
+ <xsd:group ref="scxmlmessages.messages.content" />
+ <xsd:attributeGroup ref="scxmlmessages.messages.attlist" />
+ </xsd:complexType>
+
+ <xsd:element name="messages" type="scxmlmessages.messages.type" />
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-module-anchor.xsd b/test/w3c/schema/scxml-module-anchor.xsd
new file mode 100644
index 0000000..65ff6cc
--- /dev/null
+++ b/test/w3c/schema/scxml-module-anchor.xsd
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema anchor module for SCXML
+ * anchor
+ The anchor module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines SCXML Attribute DataTypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <!-- anchor -->
+ <xsd:attributeGroup name="scxml.anchor.attlist">
+ <xsd:attribute name="type" type="xsd:NMTOKEN" use="required"/>
+ <xsd:attribute name="snapshot" type="LocLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+
+ <xsd:group name="scxml.anchor.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="scxml.anchor.type">
+ <xsd:group ref="scxml.anchor.content"/>
+ <xsd:attributeGroup ref="scxml.anchor.attlist"/>
+ </xsd:complexType>
+
+ <xsd:element name="anchor" type="scxml.anchor.type"/>
+ <!-- Added this in because it should be defined here and used in the profiles. -->
+ <xsd:simpleType name="Anchor.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ This defines the Anchor data type to be used for the transition element.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NMTOKEN"/>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-module-core.xsd b/test/w3c/schema/scxml-module-core.xsd
new file mode 100644
index 0000000..5245bc9
--- /dev/null
+++ b/test/w3c/schema/scxml-module-core.xsd
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema core module for SCXML
+ * scxml
+ * state
+ * initial
+ * onexit
+ * onentry
+ * transition
+ * parallel
+ * final
+ * history
+ * donedata
+ * if
+ * elsif
+ * else
+ * foreach
+ * raise
+ * log
+ The core module defines these elements and the
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML datatypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML attributes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+
+ <!-- scxml -->
+ <xsd:attributeGroup name="scxml.scxml.attlist">
+ <xsd:attribute name="initial" type="xsd:IDREFS"/>
+ <xsd:attribute name="name" type="xsd:NMTOKEN"/>
+ <xsd:attribute name="version" type="xsd:decimal" use="required" fixed="1.0"/>
+ <xsd:attribute name="datamodel" type="xsd:NMTOKEN" default="null" use="optional"/>
+ <xsd:attribute name="binding" type="Binding.datatype"/>
+ <xsd:attribute name="exmode" type="Exmode.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.scxml.mix">
+ <xsd:choice>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.scxml.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.scxml.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.scxml.type">
+ <xsd:group ref="scxml.scxml.content"/>
+ <xsd:attributeGroup ref="scxml.scxml.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="scxml" type="scxml.scxml.type"/>
+
+ <!-- state -->
+ <xsd:attributeGroup name="scxml.state.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="initial" type="xsd:IDREFS"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.state.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="initial" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="final" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.state.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.state.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.state.type">
+ <xsd:sequence>
+ <xsd:group ref="scxml.state.content"/>
+ </xsd:sequence>
+ <xsd:attributeGroup ref="scxml.state.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="state" type="scxml.state.type"/>
+
+ <!-- initial -->
+ <xsd:attributeGroup name="scxml.initial.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.initial.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.initial.type">
+ <xsd:group ref="scxml.initial.content"/>
+ <xsd:attributeGroup ref="scxml.initial.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="initial" type="scxml.initial.type"/>
+
+ <!-- onentry -->
+ <xsd:attributeGroup name="scxml.onentry.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.onentry.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.onentry.type">
+ <xsd:group ref="scxml.onentry.content"/>
+ <xsd:attributeGroup ref="scxml.onentry.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="onentry" type="scxml.onentry.type"/>
+
+ <!-- onexit -->
+ <xsd:attributeGroup name="scxml.onexit.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.onexit.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.onexit.type">
+ <xsd:group ref="scxml.onexit.content"/>
+ <xsd:attributeGroup ref="scxml.onexit.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="onexit" type="scxml.onexit.type"/>
+
+ <!-- transition -->
+ <xsd:attributeGroup name="scxml.transition.attlist">
+ <xsd:attribute name="event" type="EventTypes.datatype"/>
+ <xsd:attribute name="cond" type="CondLang.datatype"/>
+ <xsd:attribute name="target" type="xsd:IDREFS"/>
+ <xsd:attribute name="type" type="TransitionType.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.transition.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.transition.type">
+ <xsd:group ref="scxml.transition.content"/>
+ <xsd:attributeGroup ref="scxml.transition.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="transition" type="scxml.transition.type"/>
+
+ <!-- parallel -->
+ <xsd:attributeGroup name="scxml.parallel.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.parallel.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="parallel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="history" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.parallel.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.parallel.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.parallel.type">
+ <xsd:group ref="scxml.parallel.content"/>
+ <xsd:attributeGroup ref="scxml.parallel.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="parallel" type="scxml.parallel.type"/>
+
+ <!-- final -->
+ <xsd:attributeGroup name="scxml.final.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.final.mix">
+ <xsd:choice>
+ <xsd:element ref="onentry" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="onexit" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="donedata" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.final.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.final.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.final.type">
+ <xsd:group ref="scxml.final.content"/>
+ <xsd:attributeGroup ref="scxml.final.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="final" type="scxml.final.type"/>
+
+ <!-- history -->
+ <xsd:attributeGroup name="scxml.history.attlist">
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="type" type="HistoryType.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.history.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="transition" minOccurs="1" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.history.type">
+ <xsd:group ref="scxml.history.content"/>
+ <xsd:attributeGroup ref="scxml.history.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="history" type="scxml.history.type"/>
+
+
+
+ <!-- donedata -->
+ <xsd:attributeGroup name="scxml.donedata.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.donedata.content">
+ <xsd:choice>
+ <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:complexType name="scxml.donedata.type">
+ <xsd:group ref="scxml.donedata.content"/>
+ <xsd:attributeGroup ref="scxml.donedata.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="donedata" type="scxml.donedata.type"/>
+
+ <!-- if -->
+ <xsd:attributeGroup name="scxml.if.attlist">
+ <xsd:attribute name="cond" type="CondLang.datatype" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.if.elseif.mix">
+ <xsd:sequence>
+ <xsd:element ref="elseif" />
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.if.else.mix">
+ <xsd:sequence>
+ <xsd:element ref="else" />
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.if.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.if.elseif.mix" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.if.else.mix" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.if.type">
+ <xsd:group ref="scxml.if.content"/>
+ <xsd:attributeGroup ref="scxml.if.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="if" type="scxml.if.type"/>
+
+ <!-- elseif -->
+ <xsd:attributeGroup name="scxml.elseif.attlist">
+ <xsd:attribute name="cond" type="CondLang.datatype" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.elseif.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.elseif.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.elseif.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.elseif.type">
+ <xsd:group ref="scxml.elseif.content"/>
+ <xsd:attributeGroup ref="scxml.elseif.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="elseif" type="scxml.elseif.type"/>
+
+ <!-- else -->
+ <xsd:attributeGroup name="scxml.else.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.else.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.else.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.else.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.else.type">
+ <xsd:group ref="scxml.else.content"/>
+ <xsd:attributeGroup ref="scxml.else.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="else" type="scxml.else.type"/>
+
+ <!-- foreach -->
+ <xsd:attributeGroup name="scxml.foreach.attlist">
+ <xsd:attribute name="array" type="ValueLang.datatype" use="required"/>
+ <xsd:attribute name="item" type="xsd:string" use="required"/>
+ <xsd:attribute name="index" type="xsd:string"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.foreach.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.foreach.type">
+ <xsd:group ref="scxml.foreach.content"/>
+ <xsd:attributeGroup ref="scxml.foreach.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="foreach" type="scxml.foreach.type"/>
+
+ <!-- raise -->
+ <xsd:attributeGroup name="scxml.raise.attlist">
+ <xsd:attribute name="event" type="xsd:NMTOKEN" use="required"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.raise.mix">
+ <xsd:choice>
+ <!-- No content for this element -->
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.raise.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.raise.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.raise.type">
+ <xsd:group ref="scxml.raise.content"/>
+ <xsd:attributeGroup ref="scxml.raise.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="raise" type="scxml.raise.type"/>
+
+ <!-- log -->
+ <xsd:attributeGroup name="scxml.log.attlist">
+ <xsd:attribute name="label" type="xsd:string"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.log.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.log.type">
+ <xsd:group ref="scxml.log.content"/>
+ <xsd:attributeGroup ref="scxml.log.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="log" type="scxml.log.type"/>
+
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-module-data.xsd b/test/w3c/schema/scxml-module-data.xsd
new file mode 100644
index 0000000..ec96e71
--- /dev/null
+++ b/test/w3c/schema/scxml-module-data.xsd
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema data module for SCXML
+ * datamodel
+ * data
+ * assign
+ * param
+ * script
+ * content
+ The data module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines SCXML Attribute DataTypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <!-- datamodel -->
+ <xsd:attributeGroup name="scxml.datamodel.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.datamodel.content">
+ <xsd:sequence>
+ <xsd:element ref="data" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.datamodel.type">
+ <xsd:group ref="scxml.datamodel.content"/>
+ <xsd:attributeGroup ref="scxml.datamodel.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="datamodel" type="scxml.datamodel.type"/>
+
+ <!-- data -->
+ <xsd:attributeGroup name="scxml.data.attlist">
+ <xsd:attribute name="id" type="xsd:ID" use="required"/>
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.data.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.data.type" mixed="true">
+ <xsd:group ref="scxml.data.content"/>
+ <xsd:attributeGroup ref="scxml.data.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="data" type="scxml.data.type"/>
+
+
+
+ <!-- param -->
+ <xsd:attributeGroup name="scxml.param.attlist">
+ <xsd:attribute name="name" type="xsd:NMTOKEN" use="required"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attribute name="location" type="LocLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.param.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.param.type">
+ <xsd:group ref="scxml.param.content"/>
+ <xsd:attributeGroup ref="scxml.param.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="param" type="scxml.param.type"/>
+
+<!-- assign -->
+ <xsd:attributeGroup name="scxml.assign.attlist">
+ <xsd:attribute name="location" type="LocLang.datatype" use="required"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ <xsd:attribute name="type" type="AssignType.datatype" default="replacechildren"/>
+ <xsd:attribute name="attr" type="xsd:NMTOKEN"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.assign.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.assign.type" mixed="true">
+ <xsd:group ref="scxml.assign.content"/>
+ <xsd:attributeGroup ref="scxml.assign.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="assign" type="scxml.assign.type"/>
+
+
+<!-- script -->
+ <xsd:attributeGroup name="scxml.script.attlist">
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.script.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.script.type" mixed="true">
+ <xsd:group ref="scxml.script.content"/>
+ <xsd:attributeGroup ref="scxml.script.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="script" type="scxml.script.type"/>
+
+ <!-- content -->
+ <xsd:attributeGroup name="scxml.content.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ <xsd:attribute name="expr" type="ValueLang.datatype"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.content.content">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.content.type" mixed="true">
+ <xsd:group ref="scxml.content.content"/>
+ <xsd:attributeGroup ref="scxml.content.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="content" type="scxml.content.type"/>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-module-external.xsd b/test/w3c/schema/scxml-module-external.xsd
new file mode 100644
index 0000000..ae6ced3
--- /dev/null
+++ b/test/w3c/schema/scxml-module-external.xsd
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema external module for SCXML
+ * send
+ * cancel
+ * invoke
+ * finalize
+ The external module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines SCXML Attribute DataTypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+<!-- send -->
+ <xsd:attributeGroup name="scxml.send.attlist">
+ <xsd:attribute name="event" type="EventType.datatype"/>
+ <xsd:attribute name="eventexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="target" type="URI.datatype"/>
+ <xsd:attribute name="targetexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="type" type="xsd:string" default="scxml"/>
+ <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="idlocation" type="LocLang.datatype"/>
+ <xsd:attribute name="delay" type="Duration.datatype" default="0s"/>
+ <xsd:attribute name="delayexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="namelist" type="xsd:string"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.send.mix">
+ <xsd:choice>
+ <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.send.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.send.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.send.type">
+ <xsd:group ref="scxml.send.content"/>
+ <xsd:attributeGroup ref="scxml.send.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="send" type="scxml.send.type"/>
+
+ <!-- cancel -->
+ <xsd:attributeGroup name="scxml.cancel.attlist">
+ <xsd:attribute name="sendid" type="xsd:IDREF"/>
+ <xsd:attribute name="sendidexpr" type="ValueLang.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.cancel.mix">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.cancel.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.cancel.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.cancel.type">
+ <xsd:group ref="scxml.cancel.content"/>
+ <xsd:attributeGroup ref="scxml.cancel.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="cancel" type="scxml.cancel.type"/>
+
+
+
+ <!-- invoke -->
+ <xsd:attributeGroup name="scxml.invoke.attlist">
+ <xsd:attribute name="type" type="xsd:string" default="scxml"/>
+ <xsd:attribute name="typeexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attribute name="srcexpr" type="ValueLang.datatype"/>
+ <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="idlocation" type="LocLang.datatype"/>
+ <xsd:attribute name="namelist" type="xsd:string"/>
+ <xsd:attribute name="autoforward" type="Boolean.datatype" use="optional" default="false"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.invoke.mix">
+ <xsd:sequence>
+ <xsd:element ref="content" minOccurs="0" maxOccurs="1"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="finalize" minOccurs="0" maxOccurs="1"/>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.invoke.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.invoke.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.invoke.type">
+ <xsd:group ref="scxml.invoke.content"/>
+ <xsd:attributeGroup ref="scxml.invoke.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="invoke" type="scxml.invoke.type"/>
+
+ <!-- finalize -->
+ <xsd:attributeGroup name="scxml.finalize.attlist">
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.finalize.mix">
+ <xsd:sequence>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:group name="scxml.finalize.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.finalize.mix" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.finalize.type">
+ <xsd:group ref="scxml.finalize.content"/>
+ <xsd:attributeGroup ref="scxml.finalize.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="finalize" type="scxml.finalize.type"/>
+
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-module-script.xsd b/test/w3c/schema/scxml-module-script.xsd
new file mode 100644
index 0000000..5c241f2
--- /dev/null
+++ b/test/w3c/schema/scxml-module-script.xsd
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema script module for SCXML
+ * script
+ The script module defines these elements and their
+ attributes.
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML datatypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ Includes common SCXML attributes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This module defines Common content model extensions for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:attributeGroup name="scxml.script.attlist">
+ <xsd:attribute name="src" type="URI.datatype"/>
+ <xsd:attributeGroup ref="scxml.extra.attribs"/>
+ </xsd:attributeGroup>
+ <xsd:group name="scxml.script.content">
+ <xsd:sequence>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:complexType name="scxml.script.type" mixed="true">
+ <xsd:group ref="scxml.script.content"/>
+ <xsd:attributeGroup ref="scxml.script.attlist"/>
+ </xsd:complexType>
+ <xsd:element name="script" type="scxml.script.type"/>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-profile-basic.xsd b/test/w3c/schema/scxml-profile-basic.xsd
new file mode 100644
index 0000000..ebd5f26
--- /dev/null
+++ b/test/w3c/schema/scxml-profile-basic.xsd
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0, basic profile.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the Schema Driver file for SCXML 1.0, basic profile
+
+ This schema
+ + sets the namespace for SCXML 1.0 basic profile
+ + imports external schemas (xml.xsd)
+ + imports SCXML common datatypes, attributes and common models
+ + imports schema modules
+
+ SCXML 1.0 includes the following Modules
+
+ * SCXML core module
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports brings in the common datatypes
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports brings in the common attributes
+ for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the common content models.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-module-core.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core module for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+
+ <!--
+ Defines the CondLang datatype for this
+ profile.
+ -->
+ <xsd:simpleType name="CondLang.datatype">
+ <xsd:annotation>
+ <xsd:documentation>
+ Conditional language only consists of In(ID) where ID is
+ the XML ID type identify an SCXML state. The function
+ must evaluate to Boolean True or False.
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-profile-ecma.xsd b/test/w3c/schema/scxml-profile-ecma.xsd
new file mode 100644
index 0000000..852b1a2
--- /dev/null
+++ b/test/w3c/schema/scxml-profile-ecma.xsd
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0, ecmascript profile.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:annotation>
+ <xsd:documentation>
+ This schema
+ + sets the namespace for SCXML 1.0 basic ecmascript profile
+ + imports external schemas (xml.xsd)
+ + includes SCXML common datatypes, attributes and content models
+ + includes schema modules
+ SCXML 1.0 includes the following Modules
+ SCXML core module
+ SCXML data module
+ SCXML script module
+ SCXML external module
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes brings in the common data types for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes brings in the common attributes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-module-data.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes the data module for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:include schemaLocation="scxml-module-script.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes the script module for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:redefine schemaLocation="scxml-module-external.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the external module for SCXML and redefines the following.
+ [1] Redefines send and invoke mix group to allow
+ param
+ [2] Redefines finalize mix group to allow:
+ executable content
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group name="scxml.send.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.send.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.invoke.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.invoke.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.finalize.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.finalize.mix"/>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ </xsd:choice>
+ </xsd:group>
+ </xsd:redefine>
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes the common content models.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:redefine schemaLocation="scxml-module-core.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core module for SCXML and redefines the following.
+ [1] Redefines executable content to allow
+ send, assign, validate, cancel and script elements
+ [2] Redefines state and parallel mix group to allow
+ invoke
+ datamodel
+ [3] Redefines scxml group to allow
+ datamodel
+ script
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group name="scxml.core.executablecontent">
+ <xsd:choice>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ <xsd:element ref="send"/>
+ <xsd:element ref="assign"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="validate"/>
+ <xsd:element ref="cancel"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.scxml.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.scxml.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="script" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.state.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.state.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.parallel.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.parallel.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.donedata.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.donedata.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.raise.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.raise.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ </xsd:redefine>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-profile-minimum.xsd b/test/w3c/schema/scxml-profile-minimum.xsd
new file mode 100644
index 0000000..fa4fb4d
--- /dev/null
+++ b/test/w3c/schema/scxml-profile-minimum.xsd
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0, minimum profile.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the Schema Driver file for SCXML 1.0, minimum profile
+
+ This schema
+ + sets the namespace for SCXML 1.0 minimum profile
+ + imports external schemas (xml.xsd)
+ + imports SCXML common datatypes, attributes and common models
+ + imports schema modules
+
+ SCXML 1.0 includes the following Modules
+
+ * SCXML core module
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports brings in the common datatypes for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports brings in the common attributes for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the common content models.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-module-core.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core module for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-profile-xpath.xsd b/test/w3c/schema/scxml-profile-xpath.xsd
new file mode 100644
index 0000000..9206fea
--- /dev/null
+++ b/test/w3c/schema/scxml-profile-xpath.xsd
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0, xpath profile.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the Schema Driver file for SCXML 1.0, xpath profile
+
+ This schema
+ + sets the namespace for SCXML 1.0 basic profile
+ + imports external schemas (xml.xsd)
+ + imports SCXML common datatypes, attributes and content models
+ + imports schema modules
+
+ SCXML 1.0 includes the following Modules
+ SCXML core module
+ SCXML data module
+ SCXML external module
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+ <xsd:include schemaLocation="scxml-datatypes.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes brings in the common data types for SCXML
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-attribs.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes brings in the common attributes for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:redefine schemaLocation="scxml-module-data.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the data module for SCXML and redefines the following.
+ [1] Redefines assign attribute group to allow dataid
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attributeGroup name="scxml.assign.attlist">
+ <xsd:attributeGroup ref="scxml.assign.attlist"/>
+ <xsd:attribute name="type" type="AssignType.datatype" default="replacechildren"/>
+ <xsd:attribute name="attr" type="xsd:NMTOKEN"/>
+ </xsd:attributeGroup>
+ </xsd:redefine>
+
+ <xsd:redefine schemaLocation="scxml-module-external.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the external module for SCXML and redefines the following.
+ [1] Redefines send and invoke mix group to allow
+ param
+ [2] Redefines finalize mix group to allow:
+ executable content
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group name="scxml.send.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.send.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.invoke.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.invoke.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.finalize.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.finalize.mix"/>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ </xsd:choice>
+ </xsd:group>
+ </xsd:redefine>
+
+ <xsd:include schemaLocation="scxml-contentmodels.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This includes the common content models.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+ <xsd:redefine schemaLocation="scxml-module-core.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core module for SCXML and redefines the following.
+ [1] Redefines executable content to allow
+ send, assign, validate, and cancel elements
+ [2] Redefines state and parallel mix group to allow
+ invoke
+ datamodel
+ [3] Redefines scxml group to allow
+ datamodel
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group name="scxml.core.executablecontent">
+ <xsd:choice>
+ <xsd:group ref="scxml.core.executablecontent"/>
+ <xsd:element ref="send"/>
+ <xsd:element ref="assign"/>
+ <xsd:element ref="validate"/>
+ <xsd:element ref="cancel"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.scxml.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.scxml.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.state.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.state.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.parallel.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.parallel.mix"/>
+ <xsd:element ref="datamodel" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="invoke" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.donedata.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.donedata.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ <xsd:group name="scxml.raise.mix">
+ <xsd:choice>
+ <xsd:group ref="scxml.raise.mix"/>
+ <xsd:element ref="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ </xsd:group>
+ </xsd:redefine>
+</xsd:schema>
diff --git a/test/w3c/schema/scxml-strict.xsd b/test/w3c/schema/scxml-strict.xsd
new file mode 100644
index 0000000..fa89851
--- /dev/null
+++ b/test/w3c/schema/scxml-strict.xsd
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver file for SCXML 1.0.
+
+ This schema:
+ + sets the namespace for SCXML 1.0
+ + imports external schemas (xml.xsd)
+ + imports SCXML common datatypes, attributes and content models
+ + imports modular schemas
+
+ SCXML 1.0 includes:
+ + SCXML core constructs
+ + SCXML executable content
+ + SCXML data model and manipulation
+ + SCXML external communications
+
+ This schema is permissive such that it accomodates all
+ datamodels, but validating documents may contain markup that
+ is ignored in certain datamodels.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+
+<xsd:include schemaLocation="scxml-core-strict.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core elements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-data-strict.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the data modelelements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-external-strict.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the external communications elements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+<!-- the various elements of executable content are defined in the relevant modules.
+This gathers them up into a single type -->
+ <xsd:group name="scxml.core.executablecontent">
+ <xsd:choice>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="raise"/>
+ <xsd:element ref="if"/>
+ <xsd:element ref="foreach"/>
+ <xsd:element ref="send"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="assign"/>
+ <xsd:element ref="log"/>
+ <xsd:element ref="cancel"/>
+ </xsd:choice>
+ </xsd:group>
+
+</xsd:schema>
diff --git a/test/w3c/schema/scxml.xsd b/test/w3c/schema/scxml.xsd
new file mode 100644
index 0000000..fb69c75
--- /dev/null
+++ b/test/w3c/schema/scxml.xsd
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.w3.org/2005/07/scxml"
+ xmlns="http://www.w3.org/2005/07/scxml"
+ elementFormDefault="qualified">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver for SCXML 1.0.
+ Please use this namespace for SCXML 1.0 elements:
+
+ "http://www.w3.org/2005/07/scxml"
+
+ </xsd:documentation>
+ <xsd:documentation source="scxml-copyright.xsd"/>
+ </xsd:annotation>
+ <xsd:annotation>
+ <xsd:documentation>
+ This is the XML Schema driver file for SCXML 1.0.
+
+ This schema:
+ + sets the namespace for SCXML 1.0
+ + imports external schemas (xml.xsd)
+ + imports SCXML common datatypes, attributes and content models
+ + imports modular schemas
+
+ SCXML 1.0 includes:
+ + SCXML core constructs
+ + SCXML executable content
+ + SCXML data model and manipulation
+ + SCXML external communications
+
+ This schema is permissive such that it accomodates all
+ datamodels, but validating documents may contain markup that
+ is ignored in certain datamodels.
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This import brings in the XML namespace attributes
+ The XML attributes are used by various modules.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:import>
+
+<xsd:include schemaLocation="scxml-module-core.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the core elements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-module-data.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the data modelelements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+ <xsd:include schemaLocation="scxml-module-external.xsd">
+ <xsd:annotation>
+ <xsd:documentation>
+ This imports the external communications elements for SCXML.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:include>
+
+<!-- the various elements of executable content are defined in the relevant modules.
+This gathers them up into a single type -->
+ <xsd:group name="scxml.core.executablecontent">
+ <xsd:choice>
+ <xsd:group ref="scxml.extra.content" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="raise"/>
+ <xsd:element ref="if"/>
+ <xsd:element ref="foreach"/>
+ <xsd:element ref="send"/>
+ <xsd:element ref="script"/>
+ <xsd:element ref="assign"/>
+ <xsd:element ref="log"/>
+ <xsd:element ref="cancel"/>
+ </xsd:choice>
+ </xsd:group>
+
+</xsd:schema>
diff --git a/test/w3c/schema/xml.xsd b/test/w3c/schema/xml.xsd
new file mode 100644
index 0000000..069c970
--- /dev/null
+++ b/test/w3c/schema/xml.xsd
@@ -0,0 +1,117 @@
+<?xml version='1.0'?>
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+
+ This schema document describes the XML namespace, in a form
+ suitable for import by other schema documents.
+
+ Note that local names in this namespace are intended to be defined
+ only by the World Wide Web Consortium or its subgroups. The
+ following names are currently defined in this namespace and should
+ not be used with conflicting semantics by any Working Group,
+ specification, or document instance:
+
+ base (as an attribute name): denotes an attribute whose value
+ provides a URI to be used as the base for interpreting any
+ relative URIs in the scope of the element on which it
+ appears; its value is inherited. This name is reserved
+ by virtue of its definition in the XML Base specification.
+
+ lang (as an attribute name): denotes an attribute whose value
+ is a language code for the natural language of the content of
+ any element; its value is inherited. This name is reserved
+ by virtue of its definition in the XML specification.
+
+ space (as an attribute name): denotes an attribute whose
+ value is a keyword indicating what whitespace processing
+ discipline is intended for the content of the element; its
+ value is inherited. This name is reserved by virtue of its
+ definition in the XML specification.
+
+ Father (in any context at all): denotes Jon Bosak, the chair of
+ the original XML Working Group. This name is reserved by
+ the following decision of the W3C XML Plenary and
+ XML Coordination groups:
+
+ In appreciation for his vision, leadership and dedication
+ the W3C XML Plenary on this 10th day of February, 2000
+ reserves for Jon Bosak in perpetuity the XML name
+ xml:Father
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ &lt;schema . . .>
+ . . .
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ &lt;type . . .>
+ . . .
+ &lt;attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
diff --git a/test/w3c/txml/test278.txml b/test/w3c/txml/test278.txml
index c95b329..3f64f25 100644
--- a/test/w3c/txml/test278.txml
+++ b/test/w3c/txml/test278.txml
@@ -1,5 +1,5 @@
-<scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<scxml initial="s0" version="1.0" datamodel="ecmascript" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
<!-- test that a variable can be accessed from a state that is outside its lexical scope -->