Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>xml-xsl-snippetNew to Visual Studio Code? Get it now.
xml-xsl-snippet

xml-xsl-snippet

thomas.ca

|
6,967 installs
| (0) | Free
Simple xml and xsl snippet generator
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

xml-xsl-snippet

xml-xsl-snippet is a simple snippet vscode extension with a list of xml and xsl base snippet

Snippet list

Xsl

Snippet location ./snippet/xsl.json

Commands overview :

  • !xsl
  • !xsltemplate
  • !xsltemplateMode
  • !xslapplytemplate
  • !xslapplytemplatemode
  • !xslvalof
  • !xslelement
  • !xslatr
  • !xslkey
  • !xslvalofkey

Commands:

!xsl
<?xml version="1.0"  encoding ="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <html>
            <body>

            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>

​

!xsltemplate
<xsl:template match="xmlTag">
</xsl:template>
!xsltemplateMode
<xsl:template match="xmlTag" mode="modeName">
</xsl:template>
!xslapplytemplate
<xsl:apply-templates select="templateName"/>
!xslapplytemplatemode
<xsl:apply-templates select="templateName" mode="modeName"/>
!xslvalof
<xsl:value-of select="templateNameOrXmlTagName"/>
!xslelement
<xsl:element name="htmlElementName">
</xsl:element>
!xslatr
<xsl:attribute name="htmlAttributeName">
</xsl:attribute>
!xslkey
<xsl:key name="keyName" match="XmlTagToMatch" use="@xmlAttributeToSelect" />
!xslvalofkey
<xsl:value-of select="key('xslkeyName',@AttributeToMathWith})"/>

XML

Snippet location ./snippet/xml.json

Commands overviews

  • !xml

Commands

!xml
<?xml version=\"1.0\" ?>
<?xml-stylesheet type=\"text/xsl\" href="file.xsl"?>
<!DOCTYPE dtdName SYSTEM "file.dtd">

<xmlTag>
    
</xmlTag>

Contributing

git clone https://github.com/Thomascogez/xml-xslt-extension.git

command format !xmlORxslcommandname

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft