From ead6b851ed59fea637b787c573b1b2b7066763e1 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 3 May 2024 01:59:58 +0200 Subject: [PATCH] use 3 space indentation instead of 2 --- data.xsd | 146 ++++++++++++++++++------------------ tortue.xsd | 30 ++++---- tortue.xsl | 184 ++++++++++++++++++++++----------------------- traceur.xsd | 42 +++++------ traceur.xsl | 212 +++++++++++++++++++++++++++------------------------- 5 files changed, 310 insertions(+), 304 deletions(-) diff --git a/data.xsd b/data.xsd index 7323034..2388350 100644 --- a/data.xsd +++ b/data.xsd @@ -1,90 +1,90 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - + + + + - - + + + + + + + + + diff --git a/tortue.xsd b/tortue.xsd index 5400167..f7af42b 100644 --- a/tortue.xsd +++ b/tortue.xsd @@ -1,23 +1,23 @@ - - + + - - - - - - + + + + + + - - + + - - - - - + + + + + diff --git a/tortue.xsl b/tortue.xsl index 5abbcd0..4ca0e5b 100644 --- a/tortue.xsl +++ b/tortue.xsl @@ -1,124 +1,124 @@ - + - - + + - - - - - - - - - + + + + + + + + + - - - + + + - + - - + + - - - - + + + + - + - - - - - - + name="substitution"> + + + + + + - - - - - + + + + + - - - + + + - - - - - + select="$data" regex="."> + + + + + - - - + + + + select="interpretations/interpretation" /> - - + select="$data" regex="."> + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - + - - - - + + + + - - - href="tortue.xsd" + + + href="tortue.xsd" - + select="lsystems/lsystem[name=$nom]" /> + diff --git a/traceur.xsd b/traceur.xsd index e8aff54..25a94ec 100644 --- a/traceur.xsd +++ b/traceur.xsd @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/traceur.xsl b/traceur.xsl index da068f7..c87fc3b 100644 --- a/traceur.xsl +++ b/traceur.xsl @@ -1,165 +1,171 @@ - + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:math="http://www.w3.org/2005/xpath-functions/math" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + exclude-result-prefixes="xs math"> + - + + name="initial-y" select="0" as="xs:double" /> + as="xs:double" /> - href="traceur.xsd" + href="traceur.xsd" - - - - + + + + name="y" select="$initial-y" /> + name="angle" select="$initial-angle" /> - - - + + + - + - + name="process-commands"> + - + name="angle" /> + - + - + + name="current-command" select="$commands[1]" /> - - - + + + + select="number($current-command)" /> + select="$angle * math:pi() div 180" /> + select="$x + $distance * math:cos($radians)" /> - + select="$y + $distance * math:sin($radians)" /> + - - - + + + name="x" select="$new-x" /> + name="angle" select="$angle" /> - - - - - + + + + + - - + name="process-commands"> + + name="x" select="$x" /> - - - - - - + name="angle" select="$new-angle" /> + + + + + + + select="number($current-command)" /> + select="$angle * math:pi() div 180" /> + select="$x + $distance * math:cos($radians)" /> - + select="$y + $distance * math:sin($radians)" /> + - - - + + + name="x" select="$new-x" /> + name="angle" select="$angle" /> - - - - - + + + + + - - - + + + + name="new-states" select="($states, $new-state)" /> - + name="process-commands"> + + name="x" select="$x" /> - - - - - - + name="angle" select="$angle" /> + + + + + + + name="state" select="$states/state[1]" /> + name="remaining-states" + select="subsequence($states/state, 1, count($states/state) - 1)" /> - + name="process-commands"> + + name="x" select="($state/@x)[last()]" /> + select="($state/@y)[last()]" /> + select="($state/@angle)[last()]" /> - - - - - + select="$remaining-states" /> + + + + +