XSLTます。<xsl:適用-輸入>要素
定義と使用法
ます。<xsl:適用-輸入>要素は、インポートされたスタイルシートのテンプレートルールから適用することができます。
メインのスタイルシートテンプレートルールよりもインポートスタイルシートテンプレートルールの優先度が低いことです。 <:適用-輸入のxsl>要素は、メインのスタイルシートは、ルールの記事と同等であるのではなく、記事のテンプレートルールにスタイルシートをインポートするために使用したい場合は、それが使用されます。
文法
<xsl:apply-imports/>
プロパティ
いいえ
例
メッセージテンプレート要素のためのルールが含まれている、私たちは「standard.xsl」という名前のスタイルシートを持っていると仮定します。
<?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>
<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>
「standard.xsl "をインポートして、次のように、メッセージの要素を変更する別のスタイルシート:
<?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>
<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>
結果は、フォーム要素の中にメッセージを入れます。
<div style="border:solid blue"><h2>...</h2></div>
完全なXSLT要素のリファレンス・マニュアル