This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Importing Multiple XSL documents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Importing Multiple XSL documents" Watch "Importing Multiple XSL documents" New topic
Author

Importing Multiple XSL documents

Rajagopal Manohar
Ranch Hand

Joined: Nov 26, 2004
Posts: 183
Is there a way, I can import multiple XSL documents into a given XSL document that I use.
The importing XSL document is...
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:redirect="http://xml.apache.org/xalan/redirect" extension-element-prefixes="redirect">
<xsl:include href="foo.xsl" />
<xsl:include href="bar.xsl" />

<xsl utput method="xml" indent="yes" omit-xml-declaration="yes" media-type="text/plain"/>

<xsl:template match="/rootnode">
<xsl:for-each select="selectnode">
<xsl:apply-templates select="current()" />
</xsl:for-each>
<xsl:for-each select="/nextroot">
<xsl:apply-templates select="current()" />
</xsl:for-each>
</xsl:template>

<xsl:template match="rootnode">
<xsl:call-template name="rootnode" />
</xsl:template>
<xsl:template match="nextroot">
<xsl:call-template name="nextroot" />
</xsl:template>

</xsl:stylesheet>

The two XSL-s foo.xsl and bar.xsl are to be found in the local dir. The foo.xsl file is to be found while bar.xsl is not to be picked up.

Thanks in Advance!
Raj
Rajagopal Manohar
Ranch Hand

Joined: Nov 26, 2004
Posts: 183
Sorry for the wrong post ... was my fault, one of the xsl-s were in another directory.
My Apologies

Raj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Importing Multiple XSL documents
 
Similar Threads
xml to xml transform
XSLT merging help
How to get attribute values of repetitive nodes from an XML
merge XMl documents using schema to determine sequencing
XSLT Transformation error