在XSLT有
- <xsl:value-of select="expression"/>
在这样的情况下:
- <person>
- <!-- required stuff -->
- <name>Robert</name>
- <!-- optional stuff,free form for future extension.
- Using XMLSchema's xsd:any -->
- <profession>programmer</profession>
- <hobby>photography</hobby>
- </person>
- <xsl:for-each select="person">
- <xsl:tag-of select="."/> : <xsl:value-of select="."/>
- </xsl:for-each>
要获得这样的输出:
06002
当然上面的XSLT不会编译,因为
- <xsl:tag-of select="expression"/>
不存在。但是如何做到这一点呢?