这是我的XML输入:查询在XSLT路径
<maindocument>
<first>
<testing>random text</testing>
<checking>random test</checking>
</first>
<testing unit = "yes">
<tested>sample</tested>
<checking>welcome</checking>
<import task="yes">
<downloading>sampledata</downloading>
</import>
<import section="yes">
<downloading>valuable text</downloading>
</import>
<import chapter="yes">
<downloading>checkeddata</downloading>
</import>
</testing>
</maindocument>
输出应该是:第一,它会检查是否将测试单元=“是”。如果是,则必须检查section属性=“是”。这是输出:
<maindocument>
<import>
<doctype>Valuable text</doctype>
</import>
</maindocument
我在用xsl:if
条件检查。首先,它将检查测试单元是否为“是”。然后它会检查导入部分是否为“是”。该代码无法实现上述输出。
你使用什么查询? – 2012-08-02 20:32:55
如果测试单位=“否”,或者如果导入部分=“否”,您希望发生什么? – 2012-08-02 21:22:47