Created
September 30, 2012 18:35
-
-
Save RyanDurkin/3808097 to your computer and use it in GitHub Desktop.
Product Price XML CT Source Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tcmi="http://www.tridion.com/ContentManager/5.0/Instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:tcmse="http://www.tridion.com/ContentManager/5.1/TcmScriptAssistant" exclude-result-prefixes="productPrice tcm tcmse xsl xlink tcmi xsd xhtml" xmlns:productPrice="uuid:341ebd00-fcf9-46d3-b4db-c8402acf798b"> | |
<xsl:output method="xml" omit-xml-declaration="yes" version="1.0" indent="yes" cdata-section-elements="tcm_id product_tcm_id three_month_rate twelve_month_rate" /> | |
<xsl:template match="tcm:Component"> | |
<xsl:variable name="productPriceContent" select="./tcm:Data/tcm:Content/productPrice:Content" /> | |
<xsl:element name="product_price"> | |
<xsl:element name="tcm_id"> | |
<xsl:value-of select="@ID" /> | |
</xsl:element> | |
<xsl:element name="product_tcm_id"> | |
<xsl:value-of select="$productPriceContent/productPrice:product/@xlink:href" /> | |
</xsl:element> | |
<xsl:element name="three_month_rate"> | |
<xsl:value-of select="$productPriceContent/productPrice:three_rate" /> | |
</xsl:element> | |
<xsl:element name="twelve_month_rate"> | |
<xsl:value-of select="$productPriceContent/productPrice:twelve_rate" /> | |
</xsl:element> | |
</xsl:element> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment