1
我正在嘗試轉換此xml。但是我有格式問題。有人請指導我解決這個問題。在此先感謝XSLT無法對基於值的節點進行分組/排序
<?xml version="1.0" encoding="windows-1252"?>
<XML>
<Attributes>
<Attribute>
<id>5</id>
<Name>Buyer ID</Name>
<Type>common</Type>
<Value>Lee</Value>
</Attribute>
<Attribute>
<id>331</id>
<Name>Enviornment</Name>
<Type>common</Type>
<Value>Development</Value>
</Attribute>
<Attribute>
<id>79</id>
<Name>Retail</Name>
<Type>common</Type>
<Value></Value>
</Attribute>
<Attribute>
<id>402</id>
<Name>Gender</Name>
<Type>category</Type>
<Value>Men</Value>
</Attribute>
<Attribute>
<id>433</id>
<Name>HeelHeight</Name>
<Type>category</Type>
<Value></Value>
</Attribute>
<Attribute>
<id>41</id>
<Name>PlusShip</Name>
<Type>common</Type>
<Value>False</Value>
<Path></Path>
</Attribute>
</Attributes>
</XML>
到以下XML。可能有人請給我如何基於的屬性/屬性/類型值來改造這個XML的一些技巧
<?xml version="1.0" encoding="utf-8" ?>
<Data Schema="XML A">
<Attributes type="Common">
<Attr id="" name="Buyer ID" value="Lee" />
<Attr id="" name="Enviornment" value="Development" />
<Attr id="" name="Retail" value="" />
<Attr id="" name="PlusShip" value="False" />
</Attributes>
<Attributes type="Category">
<Attr id="" name="Gender" value="Men" />
<Attr id="" name="HeelHeight" value="" />
</Attributes>
由於Iwburk。優秀的解決方案.... – JohnXsl 2011-03-18 19:29:15
還有一個問題。我如何排序,我會得到這第一個而不是。我曾嘗試使用以下xsl:sort,但它不起作用。 任何想法... –
JohnXsl
2011-03-18 21:51:14
@lwburk:的確是的。但是,與老年人的「我沒有先前的平等」,而不是與Muenchian方法「我是第一個」? – 2011-03-19 01:58:00