Subject: [xsl] Nested <xsl:for-each select=""> From: "Swee Hing Goh" <vincentshgoh@xxxxxxxxxxx> Date: Wed, 18 Apr 2001 15:05:41 +0800 |
Expected Result: ProductID ProductTitle Description Price ImageLink P0001 Product1 Product1Desc 22.00 C:/Images/Image1.gif P0002 Product2 Product2Desc 25.00 C:/Images/Image2.gif
Result : ProductID ProductTitle Description Price ImageLink
<?xml version="1.0" encoding="UTF-8"?> <MainRoot> <ContentTypeProperty> <Record> <PropertyName>ProductID</PropertyName> </Record> <Record> <PropertyName>ProductTitle</PropertyName> </Record> <Record> <PropertyName>Description</PropertyName> </Record> <Record> <PropertyName>Price</PropertyName> </Record> <Record> <PropertyName>ImageLink</PropertyName> </Record> </ContentTypeProperty> <ContentTypePropertyData> <Record> <ProductID>P0001</ProductID> <ProductIDAC>YNYY</ProductIDAC> <ProductTitle>Product1</ProductTitle> <ProductTitleAC>YNYY</ProductTitleAC> <Description>ProDuct1Desc</Description> <DescriptionAC>YNYY</DescriptionAC> <Price>22.00</Price> <PriceAC>YNYY</PriceAC> <ImageLink>C:/Images/Image1.gif</ImageLink> <ImageLinkAC>YNYY</ImageLinkAC> <KeyValue>P0001</KeyValue> </Record> <Record> <ProductID>P0002</ProductID> <ProductIDAC>YNYY</ProductIDAC> <ProductTitle>Product2</ProductTitle> <ProductTitleAC>YNYY</ProductTitleAC> <Description>Product2Desc</Description> <DescriptionAC>YNYY</DescriptionAC> <Price>25.00</Price> <PriceAC>YNYY</PriceAC> <ImageLink>C:/Images/Image2.gif</ImageLink> <ImageLinkAC>YNYY</ImageLinkAC> <KeyValue>P0002</KeyValue> </Record> </ContentTypePropertyData> <RequestParams> <RecordToLoop>20</RecordToLoop> <result_per_page>5</result_per_page> <cmSessionData>SessionDataObject</cmSessionData> <mid>1</mid> <AccessControlRequired>Y</AccessControlRequired> <PublishingRulesRequired>Y</PublishingRulesRequired> <moveto>1</moveto> <cid>1</cid> </RequestParams> </MainRoot>
<HTML> <BODY>
<TABLE BORDER="2"> <TR> <xsl:for-each select="MainRoot/ContentTypeProperty/Record"> <xsl:variable name="Property" select="PropertyName"/> <TD> <TABLE BORDER="0"> <TR> <TD><xsl:value-of select="$Property"/></TD> </TR>
<xsl:for-each select="MainRoot/ContentTypePropertyData/Record" > <TR> <TD><xsl:value-of select="*[name()=$Property]"/></TD> </TR> </xsl:for-each> </TABLE> </TD> </xsl:for-each>
</BODY> </HTML> </xsl:template> </xsl:stylesheet> _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Leading spaces Problem, Subhasri Rajagopalan | Thread | RE: [xsl] Nested <xsl:for-each sele, Jarno Elovirta |
Re: [xsl] Copying XHTML, Mika . Borner | Date | Re: [xsl] Using Result Tree Fragmen, Jeni Tennison |
Month |