0
有以下XML:改造XSL內部存儲XML
<xsl:element name="input">
<xsl:attribute name="type">
<xsl:text>email</xsl:text>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:text>email</xsl:text>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>form-control</xsl:text>
</xsl:attribute>
<xsl:attribute name="required">
<xsl:text>true</xsl:text>
</xsl:attribute>
</xsl:element>
我如何可以通過它完全一樣,爲XSLT與下面的輸出:
<input type="email" name="email" class="form-control" required="true"/>
我已經嘗試xsl:copy-of
和disable-output-escaping
。但他們似乎都沒有工作。它甚至有可能實現這一目標嗎?
感謝。
這真的是你的輸入是什麼樣子?沒有名稱空間聲明將'xsl'前綴綁定到名稱空間?如果是這樣,你將無法處理它,因爲它不是XML。 –
與許多XSLT問題一樣,只有一個輸入示例是不夠的。我們需要知道這個例子中的輸入可能會有所不同。例如,它是否可以包含除xsl:element和xsl:attribute之外的指令? –