我正在做一個xml文檔的XSL轉換,它的結構如下。換行符<br>在XSLT中丟棄的xml
<text_collection>
<text key="score_1"> Score 1 <br/> Good. </text>
<text key="score_2"> Score 2 <br/> Poor. </text>
</text_collection>
我的XSLT是簡單的是
<xsl:template mode="codes" match="text">
<li>
<xsl:value-of select="."/>
</li>
</xsl:template>
但我面臨的問題是,在創建HTML時<br/>
丟失。在該文件中,我只得到
<ul>
<li> Score 1 Good. </li>
<li> Score 2 Poor. </li>
</ul>
任何人都可以請讓我知道爲什麼是<br/>
丟棄?
謝謝..
對不起,在這個問題中錯過了'br'的換行符。轉換後缺少換行符'
'。 – user3122561