|
Subject: Multiple XML files for one XSL file From: scott.wright@xxxxxxxxxxxxxx Date: Mon, 24 Apr 2000 17:51:29 -0500 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| text-formatting-expert patent lawye, Sebastian Rahtz | Thread | RE: Multiple XML files for one XSL , Linda van den Brink |
| ISO Entity Sets and UNICODE, Betty L. Harvey | Date | How to make a like in XSL and use t, Deloyer Nicolas |
| Month |