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