<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="functions" page="intro" subpage="collection"/>
      <!--
           Generated at 2010-10-29T18:20:48.427+01:00--><title>Saxonica: XSLT and XQuery Processing: collection</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: collection"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>collection</h1>
      <p class="subhead">collection() &#8594; node()*</p>
      <p>Returns the nodes making up the default collection</p>
      <table>
         <tr>
            <td width="470" align="left" colspan="4" style="border-top:solid 1px #3D5B96; ">
               <p>
                     <i>There are no arguments</i>
                  </p>
            </td>
         </tr>
         <tr>
            <td colspan="2"
                style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;">
               <p>
                     <i>Result</i>
                  </p>
            </td>
            <td style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;"
                colspan="2">
               <p>node()*</p>
            </td>
         </tr>
      </table>
      <p class="subhead">collection($arg as xs:string?) &#8594; node()*</p>
      <p>Returns the nodes making up the collection whose URI is supplied</p>
      <table>
         <tr>
            <td width="470" align="left" colspan="4" style="border-top:solid 1px #3D5B96; ">
               <p>
                     <i>Arguments</i>
                  </p>
            </td>
         </tr>
         <tr>
            <td width="40">
               <p> </p>
            </td>
            <td width="80" valign="top">
               <p>$arg</p>
            </td>
            <td valign="top" width="150">
               <p>xs:string?</p>
            </td>
            <td valign="top" width="200">
               <p>The supplied collection URI</p>
            </td>
         </tr>
         <tr>
            <td colspan="2"
                style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;">
               <p>
                     <i>Result</i>
                  </p>
            </td>
            <td style="border-top:solid 1px #3D5B96; border-bottom:solid 1px #3D5B96;"
                colspan="2">
               <p>node()*</p>
            </td>
         </tr>
      </table>
      <p class="subhead">Links to W3C specifications</p>
      <p>Namespace: http://www.w3.org/2005/xpath-functions</p>
      <p>Applies to: XPath 2.0, XSLT 2.0, XQuery 1.0 and later versions</p>
      <p>
            <a href="http://www.w3.org/TR/xpath-functions/#func-collection" class="bodylink">XPath 2.0 Specification</a>
         </p>
      <p>
            <a href="http://www.w3.org/TR/xpath-functions-11/#func-collection"
            class="bodylink">XPath 3.0 Specification</a>
         </p>
      <p class="subhead">Notes on the Saxon implementation</p>
      <p>Saxon implements the zero-argument function by passing a null URI to the registered 
    <code>CollectionURIResolver</code>. The default <code>CollectionURIResolver</code>
    implementation supplied with the product handles this by returning an empty sequence, 
    but a user-supplied <code>CollectionURIResolver</code> is free to handle this case any way it wishes.</p>
      <p>If a user-defined <code>CollectionURIResolver</code> has been registered, the action
    of this function is entirely user-defined. A resolver may be registered using
the <code>setCollectionResolver()</code> method on the <code>Configuration</code> object, or (in XSLT)
using <code>setAttribute()</code> on the <code>TransformerFactory</code>. The <code>CollectionURIResolver</code>
may also be nominated using the -cr option on the command line. </p>
      <p>For details of the behavior of the standard <code>CollectionURIResolver</code>,
see <a class="bodylink" href="../../sourcedocs/collections.xml">Collections</a>.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="compare.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>