开发者

Using Multiple Xslt

开发者 https://www.devze.com 2023-03-01 20:13 出处:网络
Can I use multiple Xslt to create a single output xml file. In my project, I need separate Xsl files for fonts, images, layout etc. So, is it possible to transform a single开发者_JAVA技巧 document wi

Can I use multiple Xslt to create a single output xml file.

In my project, I need separate Xsl files for fonts, images, layout etc. So, is it possible to transform a single开发者_JAVA技巧 document with multiple xslt files into a single transformed xml document.


Normally you combine xslt using two specific elements.

Choice 1. <xsl:import>

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

In this case the imported stylesheet will have lower precendece that the importing one.

Choice 2. <xsl:include>

<xsl:include href="fonts.xsl"/>

In this case you will include the contents of fonts.xsl into your main xsl. It's a real merge.

For more information have a look at Combining Stylesheets with Include and Import.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号