Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet
- version="2.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text"/>
- <xsl:template match="/">
- <xsl:text>{ "Apps": [</xsl:text>
- <xsl:for-each select="/Apps/App">
- <xsl:text>{ "ID":"</xsl:text>
- <xsl:value-of select="normalize-space(./@id)"/>
- <xsl:text>",</xsl:text>
- <xsl:text>"MajorReleases":[</xsl:text>
- <xsl:for-each select="./MajorRelease">
- <xsl:value-of select="normalize-space(./@version)"/>
- <xsl:if test="not(position()= last())">
- <xsl:text>,</xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>] }</xsl:text>
- <xsl:if test="not(position()= last())">
- <xsl:text>,</xsl:text>
- </xsl:if>
- </xsl:for-each>
- <xsl:text>] }</xsl:text>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement