<module>
<component>
<section>
<ptemplateId root="1.8"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<ptemplateId root="1.10"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
</entry>
</section>
</component>
<component>
<section>
<ptemplateId root="1.23"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
<entryRelation>
<observation>
<templateId root="1.24"/>
</observation>
</entryRelation>
</entry>
</section>
</component>
<component>
<section>
<ptemplateId root="1.8"/>
<entry>
<observation>
<templateId root="1.24"/>
</observation>
<entryRelation>
<observation>
<templateId root="1.28"/>
</observation>
</entryRelation>
</entry>
</section>
</component>
</module>
我想在基于ptemplateId的模板中选择观察,我可以知道匹配表达式吗?xpath表达式根据父属性选择子节点
<xsl:template match"******">
<!-- some processing goes here to process
observation if ptemplateId is 1.8... -->
</xsl:template>
<xsl:template match"******">
<!-- some processing goes here to process
observation if ptemplateId is other than 1.8... -->
</xsl:template>
there can be nested observation's also. (i am looking for a match expression with axis expressions to make it more generic)
ptemplateId的父将是一节,并且问题是要求观察......虽然这可能会起作用吗? //module/component/section/ptemplateId[@root='1.23']/..//observation – 2009-09-10 23:53:56