forgot an action
This commit is contained in:
parent
9edde0d297
commit
42af9013d4
2 changed files with 14 additions and 4 deletions
|
@ -7,9 +7,9 @@
|
|||
<xs:element name="tortue">
|
||||
<xs:complexType>
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
<xs:element name="turn" type="xs:integer" />
|
||||
<xs:element name="move" type="xs:positiveInteger" />
|
||||
<xs:element name="line" type="xs:positiveInteger" />
|
||||
<xs:element name="move" type="xs:positiveInteger" />
|
||||
<xs:element name="turn" type="xs:integer" />
|
||||
|
||||
<!-- TODO: Store que si on a déja eu un line/move -->
|
||||
<xs:element name="store" type="Empty" />
|
||||
|
|
14
tortue.xsl
14
tortue.xsl
|
@ -68,14 +68,24 @@
|
|||
<xsl:variable name="action"
|
||||
select="$interpretation[@member = current()]" />
|
||||
<xsl:choose>
|
||||
<!-- Déplacer -->
|
||||
<!-- Ecrire -->
|
||||
<!-- TODO: Si plusieurs <line /> se suivant on pourrait les additionner -->
|
||||
<xsl:when test="matches($action, '^LINE \d+$')">
|
||||
<move>
|
||||
<line>
|
||||
<xsl:value-of select="substring-after($action, 'LINE ')" />
|
||||
</line>
|
||||
</xsl:when>
|
||||
|
||||
<!-- Déplacer -->
|
||||
<!-- TODO: Si plusieurs <move /> se suivant on pourrait les additionner -->
|
||||
<xsl:when test="matches($action, '^MOVE \d+$')">
|
||||
<move>
|
||||
<xsl:value-of select="substring-after($action, 'MOVE ')" />
|
||||
</move>
|
||||
</xsl:when>
|
||||
|
||||
<!-- Tourner -->
|
||||
<!-- TODO: Si plusieurs <turn /> se suivant on pourrait les additionner -->
|
||||
<xsl:when test="matches($action, '^TURN -?\d+$')">
|
||||
<turn>
|
||||
<xsl:value-of select="substring-after($action, 'TURN ')" />
|
||||
|
|
Reference in a new issue