Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 334

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="../../make-menu.xsl" type="text/xsl"?><html>
   <head>
      <this-is section="extensions" page="functions" subpage="path"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: saxon:path()</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: saxon:path()"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>saxon:path()</h1>
      <p><b>saxon:path($n as node()) ==&gt; xs:string</b></p>
      <p><b>saxon:path() ==&gt; xs:string</b></p>
      <p>The second version of the function (with no arguments) is equivalent to supplying "." as the argument.
In this case there must be a context item and it must be a node.</p>
      <p>The function returns a string whose value is an XPath expression identifying the selected node in the
source tree. This can be useful for diagnostics, or to create an XPointer value, or when generating
another stylesheet to process the same document. The resulting string can be used as input to the
<code>evaluate()</code> function, provided that any namespace prefixes it uses are declared.</p>
      <p>The generated path will use lexical QNames as written in the original source document. In documents that use
multiple namespaces, this may not be the most suitable representation if there is a requirement to evaluate the
XPath expression later, as any prefixes it uses will need to be declared.</p>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="printstack.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>