如果我有这个文件
<config someAttribute="sA" otherAttribute="oA">
<parameter name="p1" yetAnotherAttribute="yAA">
Something
</parameter>
<parameter name="p2" yetAnotherAttribute="yAA2">
Something else
</parameter>
<parameter name="p3" yetAnotherAttribute="yAA3">
Something more
</parameter>
<parameter name="p4" yetAnotherAttribute="yAA4">
Yet more
</parameter>
</config>
我想要这样的东西
<configs>
<config someAttribute="sA" otherAttribute="oA">
<parameter name="p1" yetAnotherAttribute="yAA">
Something
</parameter>
<parameter name="p2" yetAnotherAttribute="yAA2">
Something else
</parameter>
</config>
<config someAttribute="sA" otherAttribute="oA">
<parameter name="p3" yetAnotherAttribute="yAA3">
Something more
</parameter>
<parameter name="p4" yetAnotherAttribute="yAA4">
Yet more
</parameter>
</config>
</configs>
你能帮我处理xslt文件吗?您能否也告诉我在哪里可以找到一些有用的学习 xslt 的资源(从基础到高级主题,除了 w3schools)?
我决定提供更有意义的文件
我想转换这个文件
<config width="100" height="200">
<parameter name="account number" country="UK">
12345678901234567890123456
</parameter>
<parameter name="client code" codeType="xa">
UK0112
</parameter>
<parameter name="email-address" accepts="yes">
john.sparrow@rex.co.uk
</parameter>
<parameter name="postal-code" country="UK">
W1A 1HQ
</parameter>
</config>
进入这个文件
<configs>
<config width="100" height="200">
<parameter name="account number" country="UK">
12345678901234567890123456
</parameter>
<parameter name="client code" codeType="xa">
UK0112
</parameter>
</config>
<config width="100" height="200">
<parameter name="email-address" accepts="yes">
john.sparrow@rex.co.uk
</parameter>
<parameter name="postal-code" country="UK">
W1A 1HQ
</parameter>
</config>
</configs>
亲切的问候,我的