Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Xsl Snippet CreatorNew to Visual Studio Code? Get it now.
Xsl Snippet Creator

Xsl Snippet Creator

Preview

chuck94

|
15,639 installs
| (1) | Free
A complete gamma of snippets for create an xsl file very fast.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Xsl Snippet Creator

Xsl Snippet Creator is a useful plugin that envelop a complete gamma of snippets for create an xsl file faster. Shown below the snippets that are furnished :

Prefix Code Description
if <xsl:if test="{condition}">{valueToShow}</xsl:if> The xsl:if element is used to put a conditional test against the content of the XML file.
val "{valueName}" : "<xsl:value-of select="*[local-name()='{path}']"/>" The xsl:value-of element extracts the value of a selected node.
loc "/*[local-name()='{path}']" This is a snippet for insert a node's path
obj "{objectName}" : {}" This is a snippet for insert a JSON object in the file
com This is a snippet for insert a comment in the file
var <xsl:variable name="$1">$2</xsl:variable> The xsl:variable element is used to declare a local or global variable.
whe <xsl:when select="$1">$2</xsl:when> The element is used to specify an action for the xsl:choose element. The xsl:when element evaluates an expression, and if it returns true, an action is performed.
tem <xsl:template match="$1">$2</xsl:template> The xsl:template element is used to build templates.
par <xsl:param name="$1"/> The xsl:param element is used to declare a local or global parameter.
wit <xsl:with-param name="$1" select="$2"/> The xsl:with-param element defines the value of a parameter to be passed into a template.
att <xsl:attribute name="$1">$2</xsl:attribute> The xsl:attribute element is used to add attributes to elements. Note: The xsl:attribute element replaces existing attributes with equivalent names.
tex xsl:text$1</xsl:text> The xsl:text element is used to write literal text to the output.
app <xsl:apply-templates match="$1"/> The xsl:apply-templates element applies a template to the current element or to the current element's child nodes. If we add a select attribute to the xsl:apply-templates element it will process only the child element that matches the value of the attribute. We can use the select attribute to specify in which order the child nodes are to be processed.
oth xsl:otherwise$1</xsl:otherwise> The xsl:otherwise element specifies a default action for the xsl:choose element. This action will take place when none of the xsl:when conditions apply.
cho xsl:choose<xsl:when select="$1">$2</xsl:when>xsl:otherwise$3</xsl:otherwise</xsl:choose> The xsl:choose element is used in conjunction with xsl:when and xsl:otherwise to express multiple conditional tests.
arr "{arrayName}" : [<xsl:for-each select="//*[local-name()='${path}']">{}<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>] This is a snippet for create a JSON array
sty <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml"><xsl:output method="{method}"><xsl:template match="//*[local-name()='{path}']">{ "{objectName}" : {} }</xsl:template>"</xsl:output>"</xsl:stylesheet>" This is a snippet for initialize the xsl document
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft