2017-07-13 20 views
1

ICECATの大きなxmlファイルがあります。そして私はいくつかの情報だけを取っておきたい。この件について次のように書いています。how transform xml document with xslt to duplicate output lines according to the child nodeSSISを使用してxsltで動的にxml子要素をフィルタリングする

私はデータベースに言語表を持っています。そして、xsltフィルタの子要素<Name>をテーブルの内容に応じて使いたいと思います。

私はSSISプロジェクトに参加しています。

答えて

1

1/Iは、フィルタとのForeach ADO列挙子変数IdLangでenurationを入れ

2 /この式で表現タスクを使用という名前の変数を作成:古い主題で @[User::Filter]=(LEN(@[User::Filter]) ==0 ? "@langid=" + (DT_WSTR, 2) @[User::IdLang] : @[User::Filter] + " or @langid=" + (DT_WSTR, 2)@[User::IdLang] )

3 /を、私は」私は "XSLT" という名前の変数に入れどのXSLTファイル、VEの:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="UTF-8" indent="yes"/> <xsl:template match="/ICECAT-interface">  <xsl:apply-templates select="Response"/> </xsl:template> <xsl:template match="Response">  <xsl:apply-templates select="SuppliersList"/> </xsl:template> <xsl:template match="SuppliersList"> <xsl:copy>  <xsl:apply-templates select="Supplier"/> </xsl:copy> </xsl:template> <xsl:template match="Supplier">  <Supplier>  <xsl:copy-of select="@ID|@LogoLowPic|@Name"/>  <xsl:attribute name="langid">   <xsl:value-of select="1"/>  </xsl:attribute> </Supplier> <xsl:apply-templates select="Names/Name"/> </xsl:template> <xsl:template match="Name[###]"> <Supplier>  <xsl:copy-of select="../../@ID|../../@LogoLowPic|@langid|@Name" /> </Supplier> </xsl:template> </xsl:stylesheet> 

4 /そして最後に、私は、スクリプトタスク

を使用

私はそれが誰かを助けることができることを願っています。

関連する問題