How to use document() function in XSL

Hi ,

 I am trying to use the document function, but am not getting the
desired results. Can anyone tell me the significance of the document
function().

I have created 2 XML's sample.xml & sample1.xml, both these XML's are
in diffrent locations. I have a stylesheet, sample.xsl which lies in
the folder containing sample1.xml. The contents of the xml & the
stylesheet are something like this

/*************************** Sample.xml *********************************/

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"
href="F:\DGXT\xml\xsl\xslTestSuite\AMIT\sample.xsl"?>
<doc>
<defaultcontent>
   <section>1</section>
   <section>2</section>
   <section>3</section>
   <section>4</section>
   <section>5</section>
   <section>6</section>
</defaultcontent>
</doc>

/************************ Sample2.xml *****************************/

<?xml version="1.0"?>
<doc>
<defaultcontent>
   <section>A</section>
   <section>B</section>
</defaultcontent>
</doc>

/************************* sample.xsl ***************************** /

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<!-- FileName: mdocs03 -->
<!-- Document: http://www.w3.org/TR/xslt -->
<!-- DocVersion: 19991118 -->
<!-- Section: 12.1 Multiple Source Documents -->
<!-- Purpose: Test document() function: Provides multiple input
     sources. Two arguments: string, node-set. -->

<xsl:template match="defaultcontent">
<out>
   <xsl:copy-of select="document('sample1.xml',section)"/>
</out>
</xsl:template>

</xsl:stylesheet>

****************************************************************************

This gives the following error "The system cannot locate the object
specified."

1. When does this error come? 
2. Can I use document function the way I have used it? 
3. Can I pass 2 parameters to this function, if yes what does the second paramater indicate?
4. What do you mean by node-set & how do you use it.

Please let me know as soon as possible

thank you


-- 
 /-)/\/\ )  |__ Amit.Kadam.___ amit_kadam@persistent.co.in  
             |    Member of Technical Staff , Persistent.Systems
            (__ 402, Senapati Bapat Rd__ Pune - 411016
                       Ph: 91-20-5678900 - Ext: 2814
                              9890-460-461

Received on Thursday, 15 July 2004 07:30:04 UTC