469,268 Members | 1,021 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

statically embedding a stylesheet within another stylesheet

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
0 1263

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dave Kuhlman | last post: by
8 posts views Thread by Alan Lue | last post: by
7 posts views Thread by pintihar | last post: by
reply views Thread by macap.usenet | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.