[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Multiple XML files for one XSL file
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|