Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
- <xsl:output method="text"/>
- <xsl:strip-space elements="node"/>
- <xsl:strip-space elements="*"/>
- <xsl:variable name="newline"><xsl:text>
</xsl:text></xsl:variable>
- <xsl:variable name="sep"><xsl:text></xsl:text></xsl:variable>
- <xsl:template match="changes/product">
- <!-- ustawienie zmiennych -->
- <!--EXTERNAL_ID-->
- <xsl:choose>
- <xsl:when test="string-length(@index)">
- <xsl:value-of select="substring(normalize-space(@index),0,100)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\N</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$sep"/>
- <!--NAME-->
- <xsl:choose>
- <xsl:when test="string-length(@code)">
- <xsl:value-of select="substring(normalize-space(@code),0,100)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>NoName</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$sep"/>
- <!--NEW_PRODUCT-->
- <xsl:value-of select="1"/>
- <xsl:value-of select="$sep"/>
- <!--AVAILABLE-->
- <xsl:value-of select="1"/>
- <xsl:value-of select="$sep"/>
- <!--BESTSELLER-->
- <xsl:value-of select="1"/>
- <xsl:value-of select="$sep"/>
- <!--BRAND-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--CATEGORIES-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--CATEGORY_MAIN-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--DESCRIPTION-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--DETAIL_1-->
- <xsl:choose>
- <xsl:when test="string-length(@id)">
- <xsl:value-of select="substring(normalize-space(@id),0,100)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\N</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$sep"/>
- <!--DETAIL_2-->
- <xsl:choose>
- <xsl:when test="string-length(@code)">
- <xsl:value-of select="substring(normalize-space(@code),0,100)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>\N</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$sep"/>
- <!--DETAIL_3-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--DETAIL_4-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--DETAIL_5-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--MANUFACTURER-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--PRICE-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--PRICE_PROMO-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--QUANTITY-->
- <xsl:value-of select="0"/>
- <xsl:value-of select="$sep"/>
- <!--URL_PRODUCT-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--URL_IMG-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--GENDER-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--URL_CATEGORY-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--URL_CATEGORY_MARK-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--POPULARITY-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--SEASON-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--COLOR-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--ADDITIONAL_IMAGE-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--INT_DETAIL1-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--INT_DETAIL2-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--DEC_DETAIL1-->
- <xsl:text>\N</xsl:text>
- <xsl:value-of select="$sep"/>
- <!--array-->
- <xsl:text>\N</xsl:text>
- <!-- koniec -->
- <xsl:value-of select="$newline"/>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment