XSLT to order attributes

后端 未结 2 1429
礼貌的吻别
礼貌的吻别 2020-12-02 02:33

How can I use XSLT to control attribute ordering?

I have an input XML document:

Input XML



        
2条回答
  •  隐瞒了意图╮
    2020-12-02 03:01

    Saxon 9.5 (PE or higher) provides a serialization option saxon:attribute-order which allows you to control the attribute order generated by the serializer. Although attribute order should not make any difference to any sane receiving application, consistent ordering can improve the human readability of the XML, and since human readability was one of the objectives of XML, I thought this was a reasonable feature to add.

提交回复
热议问题