By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

statically embedding a stylesheet within another stylesheet

P: n/a
Given AStyleSheet.xsl :

<AStyleSheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.mytest.mytest2.mytest3.com"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:element name="Test">it works</xsl:element>
</xsl:template>
</xsl:stylesheet>
</AStyleSheet>
I am trying to embedding the style sheet within another style sheet as
below. If I am using <xsl:copy-of
select="document('AStyleSheet.xsl')"/>, it works ok. But I am having
trouble doing the static embedding of the style sheet as below. Any
idea how to allow static embedding?

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<Root>
<Data>test stylesheet embedding</Data>
<!--dynamic embedding works:
<xsl:copy-of select="document('AStyleSheet.xsl')"/>
-->
<!--static embedding not working -->
<AStyleSheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.mytest.mytest2.mytest3.com"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:element name="Test">it works</xsl:element>
</xsl:template>
</xsl:stylesheet>
</AStyleSheet>
</Root>
</xsl:template>
</xsl:stylesheet>

Feb 2 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.