[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Multiple XML files for one XSL file

Subject: Multiple XML files for one XSL file
From: scott.wright@xxxxxxxxxxxxxx
Date: Mon, 24 Apr 2000 17:51:29 -0500
root must be root element
I know there's been a few postings about this...

When I try to include another XML file, I get an error 'Root must be Root
Element' Error

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

<xsl:template match="/">
     <xsl:apply-templates/>
</xsl:template>

<!-- Root Rule -->
<xsl:template match='order_info'>

     <!-- reference an external file -->
     <xsl:apply-templates select="document('external.xml')"/>

     <xsl:apply-templates select="order_info"/>
     <xsl:call-template name='splitline'/>

</xsl:template>

<!--
Match for the included XML file
This template is the root for processing the included XML
-->
<xsl:template match='included_xml'>
     <xsl:apply-templates select="doc_element"/>
</xsl:template>

</xsl:stylesheet>

INCLUDED XML - external.xml
<included_xml>
     <doc_element></doc_element>
</included_xml>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.