我想自动格式化 XML 模式定义文件。所有正常的漂亮打印内容:结束元素后的换行符,缩进。我已经看过这个答案和这个 elisp,它为我提供了基础知识。但是,除了那里的内容之外,我还想在尖括号内的属性之间换行。
像这样。前:
<s:schema elementFormDefault="qualified" targetNamespace="urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/" xmlns:tns="urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/" xmlns:detail="urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/" xmlns:to="urn:Cheeso.2009.05.Finance/TransferObject/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:address="urn:Cheeso.2009.05.Finance/TransferObject/Address/" xmlns:caller="urn:Cheeso.2009.05.Finance/TransferObject/Caller/" xmlns:gwy="urn:Cheeso.2009.05.Finance/TransferObject/Gateway/" xmlns:tender="urn:Cheeso.2009.05.Finance/TransferObject/Tender/" >
...
</s:schema>
后:
<s:schema
elementFormDefault = "qualified"
targetNamespace = "urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/"
xmlns:tns = "urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/"
xmlns:detail = "urn:Cheeso.2009.05.Finance/TransferObject/TransactionDetail/"
xmlns:to = "urn:Cheeso.2009.05.Finance/TransferObject/"
xmlns:s = "http://www.w3.org/2001/XMLSchema"
xmlns:address = "urn:Cheeso.2009.05.Finance/TransferObject/Address/"
xmlns:caller = "urn:Cheeso.2009.05.Finance/TransferObject/Caller/"
xmlns:gwy = "urn:Cheeso.2009.05.Finance/TransferObject/Gateway/"
xmlns:tender = "urn:Cheeso.2009.05.Finance/TransferObject/Tender/" >
...
</s:schema>
任何人都可以建议一些可以排列 = 的 elisp 吗?