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
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