开发者

Is there a kind of include once in XSLT?

I have FileA, FileB and FileC.

FileA includ开发者_如何学JAVAes FileB and FileC.

FileC includes FileB.

Is there an kind of include-once functionality in XSLT 1.0?


If you use <xsl:import> instead of <xsl:include> there would be no error.

As the W3C XSLT 1.0 specification says:

"It is an error if a stylesheet directly or indirectly imports itself. Apart from this, the case where a stylesheet with a particular URI is imported in multiple places is not treated specially."


You should remove the redundant xsl:include directives so each module is included only once. FileC does not need to xs:include FileB, even if it references components in FileB.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜