Skip to content

Instantly share code, notes, and snippets.

@FragsterAt
Created November 28, 2018 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FragsterAt/fc141de71f3086a8d8fd5d1c2ed0a716 to your computer and use it in GitHub Desktop.
Save FragsterAt/fc141de71f3086a8d8fd5d1c2ed0a716 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:V8Exch="http://www.1c.ru/V8/1CV8DtUD/" xmlns:core="http://v8.1c.ru/data" xmlns:v8="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:attribute-set
name = "type">
<xsl:attribute name="xsi:type"><xsl:value-of select="@xsi:type"/></xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set
name = "nil">
<xsl:attribute name="xsi:nil"><xsl:value-of select="@xsi:nil"/></xsl:attribute>
</xsl:attribute-set>
<xsl:template match="@*|node()" >
<xsl:choose>
<xsl:when test="@xsi:type != ''">
<xsl:copy use-attribute-sets="type">
<xsl:apply-templates />
</xsl:copy>
</xsl:when>
<xsl:when test="@xsi:nil != ''">
<xsl:copy use-attribute-sets="nil">
<xsl:apply-templates />
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- правила преобразования реквизитов -->
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment