This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Newbie document() question
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Newbie document() question
- From: Edmund Mitchell <EMitchell at fnf dot com>
- Date: Fri, 12 Jan 2001 08:29:42 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
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