remove debug code
parent
c2504d89c0
commit
5cbffa9c10
|
@ -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>
|
||||
|
|
|
@ -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->escapeValue( $contract->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->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->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->escapeValue( $contract->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->getValue( '</xsl:text>
|
||||
<xsl:value-of select="$from" />
|
||||
<xsl:text>', $contract->getValueIndex( '</xsl:text>
|
||||
|
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in New Issue