0
能不能請告訴我如何顯示前兩個元素是xslt? 這裏是我的代碼 http://xsltransform.net/ehVYZMp/6如何在xslt中只顯示兩個項目?
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl">
<xsl:output method="html" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" />
<xsl:template match="a">
<hmtl>
<head>
<title>New Version!</title>
</head>
<xsl:apply-templates select="t"/>
</hmtl>
</xsl:template>
<xsl:template match="t[@live='2']">
<xsl:value-of select="@b"/>
</xsl:template>
</xsl:transform>
預期輸出:12
您可以編輯您的問題以包含輸入XML嗎? xslttransform很棒,但它目前不可用....謝謝! –