0
我想聚合一个节点的所有子节点中存在的布尔值并将其添加到其父节点。 我的XML文档的样子:xslt儿童属性的布尔聚合
<?xml version="1.0" encoding="UTF-8"?>
<module>
<entity name="test" >
<attributes name="att1" translatable="true">
<attributes name="att2" translatable="false">
<attributes name="att3" translatable="false">
<attributes name="att4" translatable="true">
</attributes>
</entity>
</module>
并将其转换为:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<!--
At the entity level the property translatable shall be the result of
the OR aggregation of all children attributes.translatable
i.e.
iterate for all attributes (true OR false OR false OR true = true) ==> entity.translatable=true
-->
<entity name="test" translatable="true">
<attributes name="att1" translatable="true">
<attributes name="att2" translatable="false">
<attributes name="att3" translatable="false">
<attributes name="att4" translatable="true">
</attributes>
</entity>
</module>
,使其结构良好的请编辑源XML。 –
你在新的xml中添加translatable =“true”吗? – Developer