<?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="typeannotation"/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: saxon:type-annotation()</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: saxon:type-annotation()"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>saxon:type-annotation()</h1> <p><b>type-annotation(item as item()) ==> xs:QName</b></p> <p>This function takes an item as argument.</p> <p>If the argument is an element or attribute node, the function returns the type annotation of the node, as a QName. If the type is anonymous, this will be a system-generated internal name.</p> <p>If the argument is a document node, the function returns <code>xs:anyType</code> if the document has been schema-validated, or <code>xs:untyped</code> otherwise.</p> <p>For a text node, the function returns <code>xs:untypedAtomic</code>, and for comment, processing-instruction, and namespace nodes, it returns <code>xs:string</code>.</p> <p>If the argument is an atomic value, the function returns the type label of the atomic value, again as a QName.</p> <p>The prefix of the returned QName should not be treated as significant.</p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="unparsedentities.xml">Next</a></p> </td> </tr> </table> </body> </html>