Sophie

Sophie

distrib > Mageia > 7 > armv7hl > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 304

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="deepequal"/>
      <!--
           Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: saxon:deep-equal()</title>
      <meta name="coverage" content="Worldwide"/>
      <meta name="copyright" content="Copyright Saxonica Ltd"/>
      <meta name="title" content="Saxonica: XSLT and XQuery Processing: saxon:deep-equal()"/>
      <meta name="robots" content="noindex,nofollow"/>
      <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/>
   </head>
   <body class="main">
      <h1>saxon:deep-equal()</h1>
      <p><b>saxon:deep-equal($seq1 as item()*, $seq2 as item()*, $collation as xs:string?, $flags as xs:string) ==&gt; xs:boolean</b></p>
      <p>This function compares two sequences $seq1 and $seq2 for deep equality. The two sequences are supplied in
the first two arguments. In the absence of any $flags, the function returns the same result as the <code>deep-equal</code>
    function in the standard XPath library. The $flags argument is used to modify the way in which the comparison is
    performed.
 </p>
      <p>The $collation argument is mandatory. Supply an empty sequence to use the default collation.</p>
      <p>The flags argument is a string containing characters acting as flags that cause the function to behave
differently from the standard <code>fn:deep-equal()</code> function. The following flags are
defined:</p>
      <table>
         <tbody>
            <tr>
               <td content="para">
                  <p>N</p>
               </td>
               <td content="para">
                  <p>Include namespace nodes in the comparison. For two elements to be deep-equal, they
must have the same in-scope namespaces (that is, same prefix and same URI).</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>F</p>
               </td>
               <td content="para">
                  <p>Include namespace prefixes in the comparison. For two elements or attributes to
be equal, their names must use the same namespace prefix (or none).</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>C</p>
               </td>
               <td content="para">
                  <p>Include comment nodes in the comparison. For two element or document nodes to be deep-equal, they
must have the same comment node children.</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>P</p>
               </td>
               <td content="para">
                  <p>Include processing-instruction nodes in the comparison. 
For two element or document nodes to be deep-equal, they
must have the same processing-instruction node children.</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>J</p>
               </td>
               <td content="para">
                  <p>Join adjacent text nodes (for example, nodes either side of an ignored comment)</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>S</p>
               </td>
               <td content="para">
                  <p>Compare string values rather than typed values of simple-typed
elements and attributes.</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>A</p>
               </td>
               <td content="para">
                  <p>Compare type annotations on elements and attributes. The type annotations must match exactly.</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>I</p>
               </td>
               <td content="para">
                  <p>Compare the is-ID and is-IDREF properties on elements and attributes.</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>w</p>
               </td>
               <td content="para">
                  <p>Exclude whitespace text nodes from the comparison. 
Any whitespace text node in either tree is ignored (except when determining the typed
value of an element
annotated with a simple type or a complex type with simple content).</p>
               </td>
            </tr>
            <tr>
               <td content="para">
                  <p>?</p>
               </td>
               <td content="para">
                  <p>Explain reason for a non-match. If the result is not-equal, a warning message
explaining the reason will be sent to the ErrorListener. (In general, a sequence of warning
messages will be sent, starting with the lowest-level difference and moving up the
tree).</p>
               </td>
            </tr>
         </tbody>
      </table>
      <table width="100%">
         <tr>
            <td>
               <p align="right"><a class="nav" href="discarddocument.xml">Next</a></p>
            </td>
         </tr>
      </table>
   </body>
</html>