欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

XSLT <xsl:apply-imports> 元素

定義和用法

<xsl:apply-imports> 元素可應用來自導入樣式表中的模版規(guī)則。

導入樣式表中的模版規(guī)則的優(yōu)先級要比主樣式表中的模版規(guī)則要低。如果您希望使用導入樣式表中的某條模版規(guī)則,而不是主樣式表中的某條等價規(guī)則,就會用到 <xsl:apply-imports> 元素。

語法

<xsl:apply-imports/>

屬性

None

實例

假設(shè)我們有一個名為 "standard.xsl" 的樣式表,其中包含用于 message 元素的模版規(guī)則:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="message">
  <h2><xsl:apply-templates/></h2>
</xsl:template>

</xsl:stylesheet>

另一個樣式表能夠?qū)?"standard.xsl",并修改 message,就像這樣:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="standard.xsl"/>

<xsl:template match="message">
  <div style="border:solid blue">
  <xsl:apply-imports/>
  </div>
</xsl:template>

</xsl:stylesheet>

結(jié)果是:將把一條消息轉(zhuǎn)換到格狀的元素中:

<div style="border:solid blue"><h2>...</h2></div>