Skip to content

Collapse or expand, How to Set folds? #73

@srnanikolic

Description

@srnanikolic

Description

I am a beginner in writing extensions . My document is mix of JSON and XSLT. I don't know how to delete and to set folding on the places where I want to be. I am asking you which part of code can I use to set my own folds.

I have sometning like this

-<xsl:template match="/">

-    {
      "$schema": "****",
      "contentVersion": "*******",
-      "functions": [
      ],
-     "parameters": {
        "par1": {
          "type": "string"
         },
-            "par2": {
          "type": "string"
        },
-    <xsl:for-each select="Project/Somethnig1/Something2">

-       "par3<xsl:value-of select="@Include" />": {
            "type": "string",
            "defaultValue": "7"
          },

    </xsl:for-each>
-            "par4": {
          "type": "string"
        },
-    <xsl:if test="not(/Project/Somethnig1/Something2/Name='a1))">
-       "par5": {
              "type": "string"
          }
     </xsl:if>
             }
</xsl:template>

And want to tranfsorm it like this

-<xsl:template match="/">

-    {
      "$schema": "****",
      "contentVersion": "*******",
-      "functions": [
      ],
+     "parameters": {
             }
</xsl:template>

Or this

-<xsl:template match="/">

-    {
      "$schema": "****",
      "contentVersion": "*******",
-      "functions": [
      ],
-     "parameters": {
        "par1": {
          "type": "string"
         },
-            "par2": {
          "type": "string"
        },
+    <xsl:for-each select="Project/Somethnig1/Something2">
    </xsl:for-each>
-            "par4": {
          "type": "string"
        },
+    <xsl:if test="not(/Project/Somethnig1/Something2/Name='a1))">
     </xsl:if>
             }
</xsl:template>

Current behavior

-<xsl:template match="/">

-    {
      "$schema": "****",
      "contentVersion": "*******",
-      "functions": [
      ],
-     "parameters": {
        "par1": {
          "type": "string"
         },
-            "par2": {
          "type": "string"
        },
-    <xsl:for-each select="Project/Somethnig1/Something2">

-       "par3<xsl:value-of select="@Include" />": {
            "type": "string",
            "defaultValue": "7"
          },

    </xsl:for-each>
-            "par4": {
          "type": "string"
        },
-    <xsl:if test="not(/Project/Somethnig1/Something2/Name='a1))">
-       "par5": {
              "type": "string"
          }
     </xsl:if>
             }
</xsl:template>

Expected behavior

-<xsl:template match="/">

-    {
      "$schema": "****",
      "contentVersion": "*******",
-      "functions": [
      ],
-     "parameters": {
        "par1": {
          "type": "string"
         },
-            "par2": {
          "type": "string"
        },
+    <xsl:for-each select="Project/Somethnig1/Something2">
    </xsl:for-each>
-            "par4": {
          "type": "string"
        },
+    <xsl:if test="not(/Project/Somethnig1/Something2/Name='a1))">
     </xsl:if>
             }
</xsl:template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions