我正在研究XSL解决方案,以将XML文件转换为CSV。最终产品需要我从XML中读取发票集,然后根据发票号将它们分组,然后在发票号下方列出项目。
我不太熟练使用XSL,但我写了整个内容,但仍坚持创建表。下面是我需要创建的输出。
我试图找到使它起作用的方法,但是只有我以this posts第二个答案接近了。之后,我想出了以下代码。还想提到我正在使用XSL v 2.0
<!-- Line items -->
<!-- Full path for the elemnts I'm just lazy to tye the same thing again and again -->
<xsl:variable name="fullPath" select="/BatchObject/BaseTypeContainerList/BaseTypeContainer/BaseTypeObject/Metadata"/>
<!-- Full path for line items. I'm just too lazy -->
<xsl:variable name="fullPathLine" select="/BatchObject/BaseTypeContainerList/BaseTypeContainer/BaseTypeObject/Metadata/LineItemRows/LineItemRow"/>
<xsl:for-each-group select="$fullPath" group-by="$fullPath/Fields/Field[@Label = 'Invoice Number']/Value" >
<xsl:text>
</xsl:text>
<xsl:value-of select="current-grouping-key()"/>
<xsl:text>
</xsl:text>
<xsl:for-each select="$fullPath/Fields/Field[@Label = 'Invoice Number']/Value = current-grouping-key()">
<xsl:value-of select="('
',$fullPathLine/Fields/Field[@Label = 'Line']/Value,';')"/>
<xsl:value-of select="($fullPathLine/Fields/Field[@Label = 'Description']/Value,';')"/>
<xsl:text>
</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:for-each-group>
但是输出看起来像这样,
01108840
1 2 3 4 1 2 3 4 5 6 7 1 2 3 4 5 6 ;Ekstra lang Høy skillevegg, ekstra Gummimatte, ekstra Pallet 1200x800 Hylle 1458x216x54 Hylle 1296x216x54 Forhøyningsramme med Bakdeksel 486x270 Bakdeksel 648x378 Pallet 1200x800 Pallet frame 1200X800 Skuff 486x486x216 Hylle 486x486x54 Hyllestige med kortere Verktøyplate 486x270 Bakdeksel 486x270 Gummimatte, hylle ;
01108849
1 2 3 4 1 2 3 4 5 6 7 1 2 3 4 5 6 ;Ekstra lang Høy skillevegg, ekstra Gummimatte, ekstra Pallet 1200x800 Hylle 1458x216x54 Hylle 1296x216x54 Forhøyningsramme med Bakdeksel 486x270 Bakdeksel 648x378 Pallet 1200x800 Pallet frame 1200X800 Skuff 486x486x216 Hylle 486x486x54 Hyllestige med kortere Verktøyplate 486x270 Bakdeksel 486x270 Gummimatte, hylle ;
但是我想创建的输出是
01108840
1;Ekstra lang Høy
2;skillevegg,
3;ekstra Gummimatte,
4;ekstra Pallet 1200x800
XML数据表。
<BaseTypeContainerList>
<BaseTypeContainer ID="2292be4cbac2405097d8b40fdbe0068b" DBID="0" Archived="0001-01-01T00:00:00" Destroy="0001-01-01T00:00:00" Created="2020-03-31T12:12:00.2302687+02:00" Modified="2020-03-31T12:12:00.2302687+02:00" CreatedOrder="0" Status="Complete" RejectionMailSendt="false">
<BaseTypeObject xsi:type="Email" ID="5885e93bfc8e404187bc274417ee4ac5">
<Metadata>
<Fields>
<Field ID="186e155a1fb6442b872a88dc5f6e8a7f" Type="Text" Status="Complete" Label="Master">
<Value>KGH_Modulsystem</Value>
</Field>
<Field ID="4911c6aa66864547b5e81ae92e1241af" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Agreement Number">
<Value>130</Value>
</Field>
<Field ID="6941c04028f149b4b48cd3eb659bb71d" Type="Text" Status="Complete" Label="Seller">
<Value>112885</Value>
</Field>
<Field ID="90236e52a3194885b4812e4d84afda76" Type="Text" Status="Complete" Label="Buyer">
<Value>Modul-System AS</Value>
</Field>
<Field ID="c03844760c5342caab89253570eb6af9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Customer Number">
<Value>9095</Value>
</Field>
<Field ID="510fe5c44e1d4e9d8499a83cfae92802" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Number">
<Value>01108840</Value>
</Field>
<Field ID="d34638d12dd64e519bbb5da0b92d1f0b" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Date" Status="Complete" Label="Invoice Date">
<Value>28.11.2019</Value>
</Field>
<Field ID="c121fadca3d34278a68aa2feb26fc969" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Type">
<Value>CI</Value>
</Field>
<Field ID="2d489e9bb66b49559ee634e140df33b0" MappedFieldID="d9f08184ff57469cb9bb37fa28014249" Type="Text" Status="Complete" Label="Delivery Term">
<Value>DDP</Value>
</Field>
<Field ID="ee9cd176f29245b0978de6d0706dc478" Type="Text" Status="Complete" Label="Delivery Term Location">
<Value>Skjetten</Value>
</Field>
<Field ID="6c23fea43499495590efebb0b4cea541" Type="Text" Status="Complete" Label="Packages">
<Value>1</Value>
</Field>
<Field ID="66fdcc37d3ae4eafa21523a7ec1937d9" Type="Text" Status="Complete" Label="Package Type">
<Value>PX</Value>
</Field>
<Field ID="e6d8303294a8400e933ee622196dbcc3" Type="Text" Status="Complete" Label="Pallet Weight">
<Value>23</Value>
</Field>
<Field ID="a4548889d35d44159c1f19d55017412f" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Gross Weight">
<Value>3000</Value>
</Field>
<Field ID="05ce757f80a14c1182c59f070be06522" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Net Weight">
<Value>2500</Value>
</Field>
<Field ID="fce2f65786314fc2ae466639b8c4a7f9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Over-Head Cost">
<Value>45,22</Value>
</Field>
<Field ID="160f608391854226a6e3fc3d363a5490" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Total Amount">
<Value>452,23</Value>
</Field>
<Field ID="0cd4d1027d9d44b490e306f0e04e36e6" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Currency">
<Value>EUR</Value>
</Field>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line" />
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity" />
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description" />
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number" />
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin" />
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount" />
<Field ID="bc54c6e2147949899ed875c189753846" Type="Text" Status="Complete" Label="Table Amount">
<Value>452,23</Value>
</Field>
<Field ID="e182f943a4694123b7f7182b2b017fca" Type="Text" Status="Complete" Label="Country Sender Receiver">
<Value>SE;NO</Value>
</Field>
<Field ID="e3136a0631c346149a3cfd48e7824f85" MappedFieldID="ce76fa9ee7c74b1aa4367e2eac8de23b" Type="Text" Status="Complete" Label="Email">
<Value>stian.svarholt@kghcustoms.com</Value>
</Field>
</Fields>
<LineItemRows>
<LineItemRow ID="0" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>1</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Ekstra lang</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>406,74</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="1" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>2</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>2,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Høy skillevegg, ekstra</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>24,90</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="2" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>3</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>3,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Gummimatte, ekstra</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>13,38</Value>
</Field>
</Fields>
</LineItemRow>
</LineItemRows>
<BaseTypeContainer ID="1320da9c026b4b6ead49f7a736676570" DBID="0" Archived="0001-01-01T00:00:00" Destroy="0001-01-01T00:00:00" Created="2020-03-31T12:12:01.9314102+02:00" Modified="2020-03-31T12:12:01.9314102+02:00" CreatedOrder="1" Status="Complete" RejectionMailSendt="false">
<BaseTypeObject xsi:type="Email" ID="b77a7d029687426cb9e60d017df5bb58">
<Metadata>
<Fields>
<Field ID="186e155a1fb6442b872a88dc5f6e8a7f" Type="Text" Status="Complete" Label="Master">
<Value>KGH_Modulsystem</Value>
</Field>
<Field ID="4911c6aa66864547b5e81ae92e1241af" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Agreement Number">
<Value>130</Value>
</Field>
<Field ID="6941c04028f149b4b48cd3eb659bb71d" Type="Text" Status="Complete" Label="Seller">
<Value>112885</Value>
</Field>
<Field ID="90236e52a3194885b4812e4d84afda76" Type="Text" Status="Complete" Label="Buyer">
<Value>Modul-System AS</Value>
</Field>
<Field ID="c03844760c5342caab89253570eb6af9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Customer Number">
<Value>9095</Value>
</Field>
<Field ID="510fe5c44e1d4e9d8499a83cfae92802" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Number">
<Value>01108849</Value>
</Field>
<Field ID="d34638d12dd64e519bbb5da0b92d1f0b" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Date" Status="Complete" Label="Invoice Date">
<Value>28.11.2019</Value>
</Field>
<Field ID="c121fadca3d34278a68aa2feb26fc969" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Invoice Type">
<Value>CI</Value>
</Field>
<Field ID="2d489e9bb66b49559ee634e140df33b0" MappedFieldID="d9f08184ff57469cb9bb37fa28014249" Type="Text" Status="Complete" Label="Delivery Term">
<Value>DDP</Value>
</Field>
<Field ID="ee9cd176f29245b0978de6d0706dc478" Type="Text" Status="Complete" Label="Delivery Term Location">
<Value>Skjetten</Value>
</Field>
<Field ID="6c23fea43499495590efebb0b4cea541" Type="Text" Status="Complete" Label="Packages">
<Value>3</Value>
</Field>
<Field ID="66fdcc37d3ae4eafa21523a7ec1937d9" Type="Text" Status="Complete" Label="Package Type">
<Value>PX</Value>
</Field>
<Field ID="e6d8303294a8400e933ee622196dbcc3" Type="Text" Status="Complete" Label="Pallet Weight">
<Value>23</Value>
</Field>
<Field ID="a4548889d35d44159c1f19d55017412f" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Gross Weight">
<Value>3000</Value>
</Field>
<Field ID="05ce757f80a14c1182c59f070be06522" MappedFieldID="04672b33e6f14285abc11a866c2a993e" Type="Text" Status="Complete" Label="Batch Net Weight">
<Value>2500</Value>
</Field>
<Field ID="fce2f65786314fc2ae466639b8c4a7f9" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Over-Head Cost">
<Value>19,27</Value>
</Field>
<Field ID="160f608391854226a6e3fc3d363a5490" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Total Amount">
<Value>192,72</Value>
</Field>
<Field ID="0cd4d1027d9d44b490e306f0e04e36e6" MappedFieldID="e05d5ee159484e81b071b8bd85cca134" Type="Text" Status="Complete" Label="Currency">
<Value>EUR</Value>
</Field>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line" />
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity" />
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description" />
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number" />
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin" />
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount" />
<Field ID="bc54c6e2147949899ed875c189753846" Type="Text" Status="Complete" Label="Table Amount">
<Value>192,72</Value>
</Field>
<Field ID="e182f943a4694123b7f7182b2b017fca" Type="Text" Status="Complete" Label="Country Sender Receiver">
<Value>SE;NO</Value>
</Field>
<Field ID="e3136a0631c346149a3cfd48e7824f85" MappedFieldID="ce76fa9ee7c74b1aa4367e2eac8de23b" Type="Text" Status="Complete" Label="Email">
<Value>stian.svarholt@kghcustoms.com</Value>
</Field>
</Fields>
<LineItemRows>
<LineItemRow ID="0" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>1</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Hylle 1458x216x54</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>33,92</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="1" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>2</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Hylle 1296x216x54</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>33,44</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="2" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>3</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>1,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Forhøyningsramme med</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>19,20</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="3" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>4</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>2,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Bakdeksel 486x270</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>31,82</Value>
</Field>
</Fields>
</LineItemRow>
<LineItemRow ID="4" FromPage="1">
<Fields>
<Field ID="26fc88ba67cf4f8fb8e5a25383e9403f" Type="Text" Status="Complete" Label="Line">
<Value>5</Value>
</Field>
<Field ID="86381702799b4265a48d7d96eba3abbf" Type="Text" Status="Complete" Label="Quantity">
<Value>3,00</Value>
</Field>
<Field ID="2d42106344c54189a9045ee0dedb51b6" Type="Text" Status="Complete" Label="Description">
<Value>Bakdeksel 648x378</Value>
</Field>
<Field ID="55d85303fa4c4c37bc51ac0562d887f1" Type="Text" Status="Complete" Label="HS Code">
<Value>94032009</Value>
</Field>
<Field ID="6caaa2a60bc842c193ac8590550108b0" Type="Text" Status="Complete" Label="Article Number">
<Value>94032009</Value>
</Field>
<Field ID="a16255ad1e9549b48a9a31d001629b36" Type="Text" Status="Complete" Label="Pallets">
<Value>N</Value>
</Field>
<Field ID="64cd6620ab5a456997694c8592b9e87b" Type="Text" Status="Complete" Label="Colli" />
<Field ID="c43102102ce64a1db469408a5b131f4d" Type="Text" Status="Complete" Label="Net Weight" />
<Field ID="0565320a98c84652963ce0732cac7ad9" Type="Text" Status="Complete" Label="Origin">
<Value>SE</Value>
</Field>
<Field ID="252a9390778540edac6520d3f9f260b8" Type="Text" Status="Complete" Label="Amount">
<Value>53,07</Value>
</Field>
</Fields>
</LineItemRow>
</LineItemRows>
我知道数据集很大,但想向您展示我的工作目标。因此,希望一些人可以弄清我做错了什么。
答案 0 :(得分:0)
我认为不是
<xsl:for-each select="$fullPath/Fields/Field[@Label = 'Invoice Number']/Value = current-grouping-key()">
您想要的
<xsl:for-each select="current-group()">