Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="utf-8" />
- <xsl:template match="/">
- <root>
- <xsl:for-each select="View/Rows/Row">
- <xsl:variable name="thevalue"><xsl:for-each select="Value"><xsl:if test="position() = 1"><xsl:value-of select="current()"/></xsl:if></xsl:for-each></xsl:variable>
- <item id="{$thevalue}">
- <xsl:for-each select="Value">
- <xsl:if test="position() = 2">
- <quantidade id="{position()}">
- <xsl:value-of select="current()"/>
- </quantidade>
- </xsl:if>
- <xsl:if test="position() = 3">
- <nota id="{position()}">
- <xsl:value-of select="current()"/>
- </nota>
- </xsl:if>
- </xsl:for-each>
- </item>
- </xsl:for-each>
- </root>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment