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

Newbie document() question

Subject: Newbie document() question
From: Edmund Mitchell <EMitchell@xxxxxxx>
Date: Fri, 12 Jan 2001 08:29:42 -0800
 Newbie document() question
Hello
I'm trying to write a stylesheet which will take an XML document (call it
a.xml) coming from standard input, and slot it in as a child of a specific
element in a document (called b.xml, which will already exist on my hard
drive), and then output the new, combined document.
I'm not sure how to refer to the documents in this case in my stylesheet.
a.xml will be the default document, I guess (so template match='/' will
match the root of a.xml, right?), Then I'll refer to b.xml using the
document() function, I suppose. 
How should I write a mostly-identity transformation that puts a.xml into a
specific child of b.xml and outputs the whole thing?  
I've tried

<xsl:variable name='otherDoc' select='document(MyXml.xml)'/>
<xsl:template match='/'>
<xsl:copy-of select='$otherDoc'/>...

as well as just

<xsl:template match='/'>
<xsl:copy-of select='document(MyXml.xml)'/>...

but neither produced output, so I can't even seem to get off the ground with
this, let alone do any combining.

Thanks for any ideas

Edmund

 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.