Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Torbenson <gregory.torbenson@ryansg.com>2018-06-29 16:04:24 -0400
committerGreg Torbenson <gregory.torbenson@ryansg.com>2018-06-29 17:15:00 -0400
commit5cbffa9c1098e6eb358c5376b62ad2ae17e31d2f (patch)
treed8b67ec121b5ede58009f08a0bda07293d57770c /src
parentc2504d89c04a0b92440398a9ecc0f740bf1d534f (diff)
downloadtame-5cbffa9c1098e6eb358c5376b62ad2ae17e31d2f.tar.gz
tame-5cbffa9c1098e6eb358c5376b62ad2ae17e31d2f.tar.bz2
tame-5cbffa9c1098e6eb358c5376b62ad2ae17e31d2f.zip
remove debug code
Diffstat (limited to 'src')
-rw-r--r--src/current/c1map/c1nodes.xsl65
-rw-r--r--src/current/c1map/render.xsl58
-rw-r--r--src/current/c1map/valparse.xsl9
3 files changed, 5 insertions, 127 deletions
diff --git a/src/current/c1map/c1nodes.xsl b/src/current/c1map/c1nodes.xsl
index 2fb8fbd..02c287c 100644
--- a/src/current/c1map/c1nodes.xsl
+++ b/src/current/c1map/c1nodes.xsl
@@ -39,43 +39,18 @@
form:
'>Name' => array( <recurse> )
-->
-<!--
-<xsl:template match="c1:*[
- node()
- or ( @* and not( count( @* ) = count( @lvm:* )))]" priority="5">
-<xsl:template match="c1:*[(*) or ( @* and not( count( @* ) = count( @lvm:* )))]" priority="5">
--->
<xsl:template match="c1:*[*|@*]" priority="5">
<!-- make the output a little bit sane -->
<xsl:value-of select="$lvmp:nl" />
<!-- defer node rendering; allows us to easily determine if there are
siblings of the same name within a node boundary -->
- <lvmp:node name="{name()}"/>
-<!--
- <xsl:if test="not(@lvm:escape-param)">
- <lvmp:node name="{name()}"/>
- </xsl:if>
- <xsl:if test="@lvm:escape-param">
- <lvmp:node name="{name()}" escape-param="{@lvm:escape-param}"/>
- </xsl:if>
--->
+ <lvmp:node name="{name()}" />
<xsl:text> => </xsl:text>
-<!--
- <xsl:if test="not(@lvm:escape-param)">
- <lvmp:node-boundary>
- <xsl:apply-templates select="." mode="lvmp:c1-node-result" />
- </lvmp:node-boundary>
- </xsl:if>
- <xsl:if test="@lvm:escape-param)">
--->
- <lvmp:node-boundary escape-param="{@lvm:escape-param}">
- <xsl:apply-templates select="." mode="lvmp:c1-node-result" />
- </lvmp:node-boundary>
-<!--
- </xsl:if>
--->
+ <lvmp:node-boundary escape-param="{@lvm:escape-param}">
+ <xsl:apply-templates select="." mode="lvmp:c1-node-result" />
+ </lvmp:node-boundary>
</xsl:template>
@@ -102,22 +77,11 @@
<xsl:template match="c1:*[text()]" priority="4">
<!-- defer node rendering; allows us to easily determine if there are
siblings of the same name within a node boundary -->
-<!--
--->
-<xsl:message select="'text-only node:'"/>
-<xsl:message select="."/>
<lvmp:node name="{name()}" escape-param="{@lvm:escape-param}"/>
<xsl:text> => </xsl:text>
<xsl:text></xsl:text>
<!-- TODO: escape single quotes -->
-<!--
-<xsl:message select="'{{{'"/>
-<xsl:message>
- <xsl:apply-templates select="text()" mode="lvm:valparse"/>
-</xsl:message>
-<xsl:message select="'}}}'"/>
--->
<xsl:apply-templates select="text()" mode="lvm:valparse" />
<xsl:text>, </xsl:text>
</xsl:template>
@@ -149,28 +113,7 @@
<xsl:template match="c1:*/@lvm:*" priority="6">
<!-- discard all system attributes -->
- <xsl:message select="'\ndiscarding:'"/>
- <xsl:message select="."/>
<!-- TODO: error once everything is properly implemented -->
-<!--
- <xsl:text>'</xsl:text><xsl:value-of select="name()" />
- <xsl:text>' => '[BLORT</xsl:text>
- <xsl:apply-templates select="." mode="lvm:valparse"/>
- <xsl:text>BLORT]' </xsl:text>
--->
</xsl:template>
-
-<!--
-<xsl:template match="c1:*[text()][ @lvm:escape-param ]" priority="7">
- <lvmp:node name="{name()}" />
- <xsl:text> => </xsl:text>
-
- <xsl:text></xsl:text>
- <xsl:apply-templates select="text()" mode="lvm:valparse" />
- <xsl:text>, BLORT</xsl:text>
-
-</xsl:template>
--->
-
</xsl:stylesheet>
diff --git a/src/current/c1map/render.xsl b/src/current/c1map/render.xsl
index 01de88d..cbce134 100644
--- a/src/current/c1map/render.xsl
+++ b/src/current/c1map/render.xsl
@@ -185,67 +185,10 @@
</xsl:choose>
</xsl:param>
-
- <!--<xsl:param name="escape-param" select="$scope/lvmp:var-escape[ @escape-param ]" />-->
<xsl:param name="escape-param" select="ancestor-or-self::*[@escape-param][ 1 ]/@escape-param" />
<xsl:param name="parent-value" select="parent::lvmp:value[1]"/>
- <!--
- <xsl:message select="'====================='" />
- <xsl:message select="$var/@name" />
- <xsl:message select="ancestor-or-self::*[@escape-param]"/>
- <xsl:message select="ancestor-or-self::*"/>
- <xsl:message select="'\\\'"/>
- <xsl:message select="$escape-param" />
- <xsl:message select="'\\\\\\\\\\\\\\\\\\\\'"/>
- -->
-<!--
- <xsl:message select="parent::*/preceding-sibling::*"/>
- <xsl:message select="'\\\\\\\\\\\\\\\\\\\\'"/>
- <xsl:message select="parent::*"/>
- <xsl:param name="escape-param" select="ancestor-or-self::*[ @escape-param ][ 1 ]" />
- <xsl:message select="'====================='" />
- <xsl:message select="ancestor-or-self::*" />
- <xsl:text>*****</xsl:text>
- <xsl:choose>
- <xsl:when test="$escape-param">
- <xsl:text>$contract-&gt;escapeValue( $contract-&gt;getValue( '</xsl:text>
- <xsl:value-of select="$from" />
- <xsl:text>', $contract->getValueIndex( '</xsl:text>
- <xsl:value-of select="$index-name" />
- <xsl:text>' ) )</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>$contract-&gt;getValue( '</xsl:text>
- <xsl:value-of select="$from" />
- <xsl:text>', $contract->getValueIndex( '</xsl:text>
- <xsl:value-of select="$index-name" />
- <xsl:text>' )</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:message select="'======================'" />
- <xsl:text>ooooooooooooo:</xsl:text>
-
- <xsl:message select="$scope" />
-<xsl:message select="'==========================='"/>
-<xsl:message select="$scope"/>
-
- <xsl:text>$contract-&gt;getValue( '</xsl:text>
- <xsl:value-of select="$from" />
- <xsl:text>', $contract->getValueIndex( '</xsl:text>
- <xsl:value-of select="$index-name" />
- <xsl:text>' )</xsl:text>
--->
-<!--
-<xsl:message>===========</xsl:message>
-<xsl:message select=".[1]"/>
-<xsl:message select="$escape-param"/>
-<xsl:message select="parent::lvmp:value[1]"/>
-<xsl:message>===========</xsl:message>
--->
<xsl:choose>
<xsl:when test="$escape-param and $escape-param != '' and not($parent-value)">
-<xsl:message select="'(escaping)'"/>
<xsl:text>$contract-&gt;escapeValue( $contract-&gt;getValue( '</xsl:text>
<xsl:value-of select="$from" />
<xsl:text>', $contract->getValueIndex( '</xsl:text>
@@ -253,7 +196,6 @@
<xsl:text>' ) )</xsl:text>
</xsl:when>
<xsl:otherwise>
-<xsl:message select="'(not escaping)'"/>
<xsl:text>$contract-&gt;getValue( '</xsl:text>
<xsl:value-of select="$from" />
<xsl:text>', $contract->getValueIndex( '</xsl:text>
diff --git a/src/current/c1map/valparse.xsl b/src/current/c1map/valparse.xsl
index e06de78..e84b25d 100644
--- a/src/current/c1map/valparse.xsl
+++ b/src/current/c1map/valparse.xsl
@@ -36,6 +36,7 @@
</xsl:call-template>
</xsl:template>
+
<xsl:template name="lvm:valparse">
<xsl:param name="str" />
@@ -142,14 +143,6 @@
) )
" />
-
- <!--
- <xsl:message select="$name,parent::c1:*" />
- -->
-
- <!--
- <xsl:variable name="escape-param" select="ancestor::" />
- -->
<lvmp:value ref="{$rightmost}" index-key="{$context}">
<xsl:call-template name="lvmp:gen-val">
<xsl:with-param name="name" select="$context" />