我们使用git存储库中的FileVault xml文件来配置在我们的Adobe体验管理器实例中运行的自定义OSGi服务。
这在许多情况下效果很好,但似乎我们必须水平列出多值属性,在一个仅以逗号分隔的字符串中,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
aLongMultiValuedProperty="[first,second,third,fourth,fifth]"/>
这个示例看起来并没有那么糟糕,但是我最近编辑了一个包含1998个字符的文件,git diff非常难看。
因此,我更希望我们的列表可以这样格式化:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
aLongMultiValuedProperty="[
first,
second,
third,
fourth,
fifth]"/>
但是,这样做会导致JCR属性值中出现额外的空格。
有没有一种不同的垂直格式不会产生这样的额外空格?
https://stackoverflow.com/questions/56653251
复制相似问题