我非常喜歡XSLT,我想根據XML文件中的特定屬性將XML文件拆分爲多個HTML文件。將XSLT拆分爲多個HTML文件
這裏是我的XML文件的樣本:
<article>
<div>
<paragraph>text text text</paragraph>
</div>
<div class="zoologie">
<def>this is a definition</def>
<def>this is another definition</def>
<example>this is a first example</example>
<example>this is a second example</example>
</div>
</article>
<article>
<div>
<paragraph>text text text</paragraph>
</div>
<div class="médecine">
<def>this is a definition</def>
<def>this is another definition</def>
<example>this is a first example</example>
<example>this is a second example</example>
</div>
</article>
<article>
<div>
<paragraph>text text text</paragraph>
</div>
<div class="zoologie">
<def>this is a definition</def>
<def>this is another definition</def>
<example>this is a first example</example>
<example>this is a second example</example>
</div>
</article>
我想獲得一個HTML文件組togheter具有相同屬性類的所有文章。例如,一個名爲zoologie.html的HTML文件收集包含屬性class =「zoologie」的所有文章。另一個名爲médecine.html的HTML文件收集了屬性class =「médecine」的所有文章。我已經嘗試了分割功能,但它不會工作。如果你能幫助我,我會很感激。 謝謝, 弗洛
您可以使用XSLT 2.0處理器和'xsl:result-document',還是使用支持擴展的XSLT 1.0處理器來創建具有一個樣式表的多個文檔? –
我可以使用XSLT 2.0處理器 – FloD