This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]