471,573 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,573 software developers and data experts.

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 1324

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
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.