I have an XML file(below is a part of it) with more than 1000 lines of code like below
<?xml version="1.0" encoding="UTF-8" ?>
<exchange xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<viewpoints>
<view name="002. PG vs MD - Overview">
<viewpoint tool="none" render="shaded" lighting="headlight" focal="30.3740807783">
<camera projection="persp" near="1.0000000000" far="10.0000000000" aspect="1.4551804424" height="0.7853981634">
<position>
<pos3f x="14.2834498406" y="-183.6741132934" z="35.6151508952"/>
</position>
<rotation>
<quaternion a="0.3979643079" b="0.0563656552" c="0.1284089725" d="0.9066192466"/>
</rotation>
</camera>
</viewpoint>
</view>
<view name="004. EL vs MD - Overview">
<viewpoint tool="none" render="shaded" lighting="headlight" focal="30.3740807783">
<camera projection="persp" near="1.0000000000" far="10.0000000000" aspect="1.4551804424" height="0.7853981634">
<position>
<pos3f x="14.2834498406" y="-183.6741132934" z="35.6151508952"/>
</position>
<rotation>
<quaternion a="0.3979643079" b="0.0563656552" c="0.1284089725" d="0.9066192466"/>
</rotation>
</camera>
</viewpoint>
</view>
</viewpoints>
</exchange>
I would like to sort the code above using the attribute "name" but I would like it to sort using the first word in the attribute value. In the above example, I would like it sore using PG/EL.
P.S: Please note that I'm not very familiar with XSLT or any other tools, but I can probably understand it with little explanation.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…