You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ra...@apache.org on 2008/07/29 01:46:53 UTC
svn commit: r680570 -
/commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml
Author: rahul
Date: Mon Jul 28 16:46:52 2008
New Revision: 680570
URL: http://svn.apache.org/viewvc?rev=680570&view=rev
Log:
Port r680568 from trunk.
Update datamodel section of the guide, stress namespace awareness of document.
Pointed out by Tom van den Berg on the user list (thanks Tom).
Modified:
commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml
Modified: commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml?rev=680570&r1=680569&r2=680570&view=diff
==============================================================================
--- commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml (original)
+++ commons/proper/scxml/branches/J6/xdocs/guide/datamodel.xml Mon Jul 28 16:46:52 2008
@@ -37,9 +37,15 @@
<p>SCXML gives authors the ability to define a first-class data model as
part of the SCXML document. A data model consists of a <datamodel>
element containing one or more <data> element, each of which may
- contain a XML data tree. For example, the document level data model for a
- SCXML document defining the states in a travel reservation system may look
- like this:</p>
+ contain an XML data tree (i.e. it is recommended that each <data>
+ element contain <b>only one child element</b>).</p>
+
+ <p>Also, SCXML documents are <b>namespace-aware</b>. Therefore, the root
+ of the data tree should define one or more namespaces as needed, and must
+ <b>not</b> itself be in the SCXML namespace.</p>
+
+ <p>For example, the document level data model for a SCXML document
+ defining the states in a travel reservation system may look like this:</p>
<pre>
<scxml xmlns="http://www.w3.org/2005/07/scxml"
@@ -48,7 +54,8 @@
<datamodel>
<data name="airlineticket">
- <flight>
+ <!-- Note namespace declaration in line below -->
+ <flight xmlns="">
<origin/>
<destination/>
<!-- default values for trip and class -->
@@ -58,7 +65,7 @@
</flight>
</data>
<data name="hotelbooking">
- <hotel>
+ <hotel xmlns="">
<stay>
<startdate/>
<enddate/>
@@ -134,7 +141,7 @@
<state id="airline-ticket">
<datamodel>
<data name="airlineticket">
- <flight>
+ <flight xmlns="">
<origin/>
<destination/>
<!-- default values for trip and class -->
@@ -156,7 +163,7 @@
<state id="hotel-booking">
<datamodel>
<data name="hotelbooking">
- <hotel>
+ <hotel xmlns="">
<stay>
<startdate/>
<enddate/>