2011-06-10 1 views
1

xml 문서의 모든 cd 요소를 반복하고 싶습니다. XSLT에서BizTalk에서 반복을 사용하는 방법?

<?xml version="1.0" encoding="iso-8859-1"?> 
<ns0:catalog xmlns:ns0="http://Catalog.MP"> 
    <cd> 
     <title>Empire Burlesque</title> 
     <artist>Bob Dylan</artist> 
     <country>USA</country> 
     <company>Columbia</company> 
     <price>10.90</price> 
     <year>1985</year> 
    </cd> 
    <cd> 
     <title>Hide your heart</title> 
     <artist>Bonnie Tyler</artist> 
     <country>UK</country> 
     <company>CBS Records</company> 
     <price>9.90</price> 
     <year>1988</year> 
    </cd> 
    <cd> 
     <title>Greatest Hits</title> 
     <artist>Dolly Parton</artist> 
     <country>USA</country> 
     <company>RCA</company> 
     <price>9.90</price> 
     <year>1982</year> 
    </cd> 
    <cd> 

나는 그런 일을하고 foreach 루프 사용합니다 :

<xsl:output method="html" indent="yes"/> 

    <xsl:template match="/ns0:catalog"> 

    <div class="catalog"> 
     <xsl:for-each select="cd"> 
      <div class="cd"> 
       <div class="title"> 
        <xsl:value-of select="title/text()" /> 
       </div> 
       <div class="artist"> 
        <xsl:value-of select="artist/text()" /> 
       </div> 
       <div class="country"> 
        <xsl:value-of select="country/text()" /> 
       </div> 
       <div class="company"> 
        <xsl:value-of select="company/text()" /> 
       </div> 
       <div class="price"> 
        <xsl:value-of select="price/text()" /> 
       </div> 
       <div class="year"> 
        <xsl:value-of select="year/text()" /> 
       </div> 
      </div> 
     </xsl:for-each> 

을하지만 어떻게 Biztalk에서 그것을하고 해당 펑 토이 드를 사용할 수 있습니까?

+0

http://msdn.microsoft.com/en-us/library/ee253826%28v=bts.10%29.aspx - 이것이 더 도움이되었습니다! – marko

답변