Commit c3910b07 authored by Louis-Nol Pouchet's avatar Louis-Nol Pouchet
Browse files

2005-06-15 Louis-Noel Pouchet <louis-noel.pouchet@lrde.epita.fr>

	* doc/xml/vaucanson.xsd: Change the grammar in order to make <initial>
	and <final> children of <transitions>. Suppress tags <initials> and
	<finals>.
	
	* include/vaucanson/xml/node.hh,
	* include/vaucanson/xml/node.hxx,
	* include/vaucanson/xml/xml_converter.hxx: Update according to the 
	grammar changes.

	* src/tests/xml/trans_ref.xml,
	* src/tests/xml/r_ref.xml,
	* src/tests/xml/z_ref.xml,
	* src/tests/xml/z_min_plus_ref.xml,
	* src/tests/xml/b_ref.xml,
	* src/tests/xml/z_max_plus_ref.xml,
	* src/tests/xml/fmp_ref.xml,
	* src/tests/xml/session_ref.xml: Update accordingly.
parent 7cc21a20
2005-06-15 Louis-Noel Pouchet <louis-noel.pouchet@lrde.epita.fr>
* doc/xml/vaucanson.xsd: Change the grammar in order to make <initial>
and <final> children of <transitions>. Suppress tags <initials> and
<finals>.
* include/vaucanson/xml/node.hh,
* include/vaucanson/xml/node.hxx,
* include/vaucanson/xml/xml_converter.hxx: Update according to the
grammar changes.
* src/tests/xml/trans_ref.xml,
* src/tests/xml/r_ref.xml,
* src/tests/xml/z_ref.xml,
* src/tests/xml/z_min_plus_ref.xml,
* src/tests/xml/b_ref.xml,
* src/tests/xml/z_max_plus_ref.xml,
* src/tests/xml/fmp_ref.xml,
* src/tests/xml/session_ref.xml: Update accordingly.
2005-06-15 Louis-Noel Pouchet <louis-noel.pouchet@lrde.epita.fr>
 
* include/vaucanson/z_fmp_transducer.hh,
......
......@@ -219,7 +219,7 @@ properties can be set with the <drawing> tag.
<!--
<transition> tag properties. Used to define a transition between two
states. This tag must be a child of <transitions> tag.
states . This tag must be a child of <transitions> tag.
The optional "weight" attribute can be used on weighted automata.
On transducers, use the "in" and "out" attributes to define input and
output for the transition.
......@@ -280,12 +280,15 @@ Global geometry and drawing properties can be set for all states.
<!--
<transitions> tag properties. Used to enumerate transitions in the automaton.
<transitions> tag properties. Used to enumerate transitions in the
automaton, including initials and finals.
Global geometry and drawing properties can be set for all transitions.
-->
<xs:complexType name="transitions">
<xs:sequence>
<xs:element name="transition" type="transition" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="initial" type="initial" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="final" type="final" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_trans" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
......@@ -294,6 +297,8 @@ Global geometry and drawing properties can be set for all transitions.
<xs:complexType name="transitions_transducer">
<xs:sequence>
<xs:element name="transition" type="transition_transducer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="initial" type="initial_transducer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="final" type="final_transducer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_trans" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
......@@ -355,45 +360,6 @@ and drawing properties.
</xs:complexType>
<!--
<initials> tag properties. Used to enumerate <initial> tags.
-->
<xs:complexType name="initials">
<xs:sequence>
<xs:element name="initial" type="initial" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_xy" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="initials_transducer">
<xs:sequence>
<xs:element name="initial" type="initial_transducer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_xy" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!--
<finals> tag properties. Used to enumerate <final> tags.
-->
<xs:complexType name="finals">
<xs:sequence>
<xs:element name="final" type="final" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_xy" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="finals_transducer">
<xs:sequence>
<xs:element name="final" type="final_transducer" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="geometry" type="geometry_xy" minOccurs="0"/>
<xs:element name="drawing" type="drawing" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!--
<content> tag properties. This tag is used to define the structure of
......@@ -410,8 +376,6 @@ Two possible contents are available, one for automata and one for transducers.
<xs:element name="drawing" type="drawing" minOccurs="0"/>
<xs:element name="states" type="states"/>
<xs:element name="transitions" type="transitions"/>
<xs:element name="initials" type="initials"/>
<xs:element name="finals" type="finals"/>
</xs:sequence>
</xs:complexType>
......@@ -421,8 +385,6 @@ Two possible contents are available, one for automata and one for transducers.
<xs:element name="drawing" type="drawing" minOccurs="0"/>
<xs:element name="states" type="states"/>
<xs:element name="transitions" type="transitions_transducer"/>
<xs:element name="initials" type="initials_transducer"/>
<xs:element name="finals" type="finals_transducer"/>
</xs:sequence>
</xs:complexType>
......
......@@ -106,8 +106,6 @@ CREATE_CLASSNODE(type)
CREATE_CLASSNODE(content)
CREATE_CLASSNODE(states)
CREATE_CLASSNODE(transitions)
CREATE_CLASSNODE(initials)
CREATE_CLASSNODE(finals)
CREATE_CLASSNODE(state)
CREATE_CLASSNODE(transition)
CREATE_CLASSNODE(initial)
......@@ -187,8 +185,6 @@ CREATE_SPEC_PARAM_NODE(monoid, TParmFMP, FMPtype)
register_in_factory(f, T, content) \
register_in_factory(f, T, states) \
register_in_factory(f, T, transitions) \
register_in_factory(f, T, initials) \
register_in_factory(f, T, finals) \
register_in_factory(f, T, state) \
register_in_factory(f, T, transition) \
register_in_factory(f, T, initial) \
......
......@@ -124,8 +124,6 @@ PROCESS_NODE(type)
PROCESS_NODE(content)
PROCESS_NODE(states)
PROCESS_NODE(transitions)
PROCESS_NODE(initials)
PROCESS_NODE(finals)
/*-------.
......
......@@ -96,14 +96,10 @@ namespace vcsn
create_transition(*e, aut, node, state2str);
// Create initial transitions.
node = doc_->createElement(STR2XML("initials"));
content->appendChild(node);
for_each_initial_state(i, aut)
create_initial(*i, aut, node, state2str);
// Create final transitions.
node = doc_->createElement(STR2XML("finals"));
content->appendChild(node);
for_each_final_state(f, aut)
create_final(*f, aut, node, state2str);
}
......
......@@ -18,13 +18,9 @@
<transitions>
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials>
<initial state="s0"/>
</initials>
<finals>
<final state="s1"/>
</finals>
</transitions>
</content>
</automaton>
......@@ -24,13 +24,9 @@
<transitions>
<transition dst="s1" in="a" out="x" src="s0"/>
<transition dst="s1" in="a" out="y" src="s0"/>
</transitions>
<initials>
<initial state="s0"/>
</initials>
<finals>
<final in="b" out="x" state="s2"/>
</finals>
</transitions>
</content>
</transducer>
......@@ -18,13 +18,9 @@
<transitions>
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials>
<initial label="1" state="s0"/>
</initials>
<finals>
<final label="1" state="s1"/>
</finals>
</transitions>
</content>
</automaton>
......@@ -19,8 +19,6 @@
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials/>
<finals/>
</content>
</automaton>
......@@ -42,8 +40,6 @@
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials/>
<finals/>
</content>
</automaton>
......
......@@ -25,13 +25,9 @@
<transition dst="s1" in="a" out="x" src="s0"/>
<transition dst="s1" in="a" out="y" src="s0"/>
<transition dst="s2" in="b" out="x" src="s1"/>
</transitions>
<initials>
<initial state="s0"/>
</initials>
<finals>
<final out="x" state="s1"/>
</finals>
</transitions>
</content>
</transducer>
......@@ -18,13 +18,9 @@
<transitions>
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials>
<initial label="1" state="s0"/>
</initials>
<finals>
<final label="1" state="s1"/>
</finals>
</transitions>
</content>
</automaton>
......@@ -18,13 +18,9 @@
<transitions>
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials>
<initial label="1" state="s0"/>
</initials>
<finals>
<final label="1" state="s1"/>
</finals>
</transitions>
</content>
</automaton>
......@@ -18,13 +18,9 @@
<transitions>
<transition dst="s1" label="a" src="s0"/>
<transition dst="s2" label="b" src="s1"/>
</transitions>
<initials>
<initial label="1" state="s0"/>
</initials>
<finals>
<final label="1" state="s1"/>
</finals>
</transitions>
</content>
</automaton>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment