|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:svg="http://www.w3.org/2000/svg" >
<xsl:template match="/">
<response>
<xsl:apply-templates select="//*[@class='display mutation_details_table dataTable no-footer']/tbody/tr[position()>=1 and count(.//*[@class='oncogenic-icon-image level1R oncogenic']/@class)>0]" mode="response"/>
</response>
</xsl:template>
<xsl:template match="//*[@class='display mutation_details_table dataTable no-footer']/tbody/tr[position()>=1 and count(.//*[@class='oncogenic-icon-image level1R oncogenic']/@class)>0]" mode="response">
<item>
<sample>
<xsl:value-of select="td[position()=1]"/>
</sample>
<variants>
<xsl:value-of select="*//*[@class='cc-short-study-name simple-tip']/text()"/>
<xsl:value-of select="*[@class='cc-short-study-name simple-tip']/text()"/>
<xsl:if test="@class='cc-short-study-name simple-tip'">
<xsl:value-of select="text()"/>
</xsl:if>
</variants>
<annotation>
<xsl:value-of select="*//*[@class='oncogenic-icon-image level1R oncogenic']/@class"/>
<xsl:value-of select="*[@class='oncogenic-icon-image level1R oncogenic']/@class"/>
<xsl:if test="@class='oncogenic-icon-image level1R oncogenic'">
<xsl:value-of select="@class"/>
</xsl:if>
</annotation>
</item>
</xsl:template>
</xsl:stylesheet>
这个里边如何xpath定位呢?又回到原来的问题了 |
|