#45 Folding

SVN
closed-fixed
QCodeEdit (16)
5
2009-02-16
2009-01-21
No

Some Problem in folding :
1. If you have XML comment in XML file and the begin of one, on the same line of the end of the other
a. if you collapse the first, all is collapsed
b. if you collapse the second, and next the first, all is collapsed in one, but if the cursor move after the second comment, line are replace by other.
<!-- <tr>
<td colspan="5" class="champ">
<xsl:value-of select="$LBL.TAUREMISEMOYEN"/>
</td>
<td>:</td>
<td align="center" class="smalprix">
<xsl:if test="tauxRemise">
<xsl:value-of select="format-number(tauxRemise, $FORMAT_PCT, $LOCALE)"/>
</xsl:if>
</td>
</tr>
--> <xsl:if test="$TARIF ='HT'"><!--
<tr>
<td colspan="5" class="champ">
<xsl:value-of select="$LBL.TOTAPRESREMISE"/>
</td>
<td>:</td>
<td align="center" class="smalprix">
<xsl:if test="totalHt">
<xsl:value-of select="format-number(totalHt, $FORMAT_MNT, $LOCALE)"/>
</xsl:if>
</td>
</tr>
-->
2. If you collapse the line where you have the tr and the td, the collapse is made on the second and not on the first. Next if collapse all the xsl:template, the </xsl:template> is always visible.
<xsl:template match="JEvfView" mode="new">
<tr class="creer">
<td>
text
</td>
<xsl:if test="//error">
<tr> <td class="erreur" colspan="10">
<xsl:apply-templates select="//error"/>
</td>
</tr>
</xsl:if>
</xsl:template>

Discussion

  • fullmetalcoder

    fullmetalcoder - 2009-01-21

    Err... Two cases of malformed files as far as I can tell...

    In the first sample the xsl:if tag probably need a "/>" closure instead of a ">" one

    In the second sample there is a missing the first <tr> tag has no matching </tr>

     
  • fullmetalcoder

    fullmetalcoder - 2009-01-21
    • status: open --> open-invalid
     
  • Ulrich Van Den Hekke

    I have made a mistake when i copy/paste my exemple.
    See example attached.

     
  • fullmetalcoder

    fullmetalcoder - 2009-01-22
    • assigned_to: nobody --> fullmetalcoder
    • status: open-invalid --> open-fixed
     
  • fullmetalcoder

    fullmetalcoder - 2009-01-22

    There were a couple of issues left in code folding indeed.
    I've cleaned things up and SVN trunk should behave much better now, please confirm (or infirm).

    Thanks for the report and for your sample files which helped me a lot to figure what was going wrong.

     
  • Ulrich Van Den Hekke

    It's work, thanks

     
  • fullmetalcoder

    fullmetalcoder - 2009-02-16
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.