Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:13 GMT 2011 -->
<TITLE>
TypeChecker
</TITLE>

<META NAME="date" CONTENT="2011-12-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="TypeChecker";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/Tokenizer.html" title="class in net.sf.saxon.expr.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/expr/parser/TypeChecker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TypeChecker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.saxon.expr.parser</FONT>
<BR>
Class TypeChecker</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.saxon.expr.parser.TypeChecker</B>
</PRE>
<HR>
<DL>
<DT><PRE>public final class <B>TypeChecker</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
This class provides Saxon's type checking capability. It contains a static method,
 staticTypeCheck, which is called at compile time to perform type checking of
 an expression. This class is never instantiated.
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#applyFunctionConversionRules(net.sf.saxon.om.SequenceIterator, net.sf.saxon.type.ItemType, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, javax.xml.transform.SourceLocator, net.sf.saxon.expr.XPathContext)">applyFunctionConversionRules</A></B>(<A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;input,
                             <A HREF="../../../../../net/sf/saxon/type/ItemType.html" title="interface in net.sf.saxon.type">ItemType</A>&nbsp;suppliedItemType,
                             <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                             <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                             <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A>&nbsp;locator,
                             <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply the function conversion rules to a value (represented as an iterator), given a required type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/value/Value.html" title="class in net.sf.saxon.value">Value</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#applyFunctionConversionRules(net.sf.saxon.om.ValueRepresentation, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, javax.xml.transform.SourceLocator, net.sf.saxon.expr.XPathContext)">applyFunctionConversionRules</A></B>(<A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A>&nbsp;value,
                             <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                             <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                             <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A>&nbsp;locator,
                             <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply the function conversion rules to a value, given a required type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#ebvError(net.sf.saxon.expr.Expression, net.sf.saxon.type.TypeHierarchy)">ebvError</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
         <A HREF="../../../../../net/sf/saxon/type/TypeHierarchy.html" title="class in net.sf.saxon.type">TypeHierarchy</A>&nbsp;th)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test whether a given expression is capable of returning a value that has an effective boolean
 value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#staticTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, boolean, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.TypeCheckerEnvironment)">staticTypeCheck</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;supplied,
                <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;req,
                boolean&nbsp;backwardsCompatible,
                <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                <A HREF="../../../../../net/sf/saxon/TypeCheckerEnvironment.html" title="interface in net.sf.saxon">TypeCheckerEnvironment</A>&nbsp;visitor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check an expression against a required type, modifying it if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#strictTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.expr.StaticContext)">strictTypeCheck</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;supplied,
                <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;req,
                <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                <A HREF="../../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check an expression against a required type, modifying it if necessary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#testConformance(net.sf.saxon.om.ValueRepresentation, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.XPathContext)">testConformance</A></B>(<A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A>&nbsp;val,
                <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test whether a given value conforms to a given type</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="staticTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, boolean, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.TypeCheckerEnvironment)"><!-- --></A><H3>
staticTypeCheck</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>staticTypeCheck</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;supplied,
                                         <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;req,
                                         boolean&nbsp;backwardsCompatible,
                                         <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                                         <A HREF="../../../../../net/sf/saxon/TypeCheckerEnvironment.html" title="interface in net.sf.saxon">TypeCheckerEnvironment</A>&nbsp;visitor)
                                  throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Check an expression against a required type, modifying it if necessary.
 <p/>
 <p>This method takes the supplied expression and checks to see whether it is
 known statically to conform to the specified type. There are three possible
 outcomes. If the static type of the expression is a subtype of the required
 type, the method returns the expression unchanged. If the static type of
 the expression is incompatible with the required type (for example, if the
 supplied type is integer and the required type is string) the method throws
 an exception (this results in a compile-time type error being reported). If
 the static type is a supertype of the required type, then a new expression
 is constructed that evaluates the original expression and checks the dynamic
 type of the result; this new expression is returned as the result of the
 method.</p>
 <p/>
 <p>The rules applied are those for function calling in XPath, that is, the rules
 that the argument of a function call must obey in relation to the signature of
 the function. Some contexts require slightly different rules (for example,
 operands of polymorphic operators such as "+"). In such cases this method cannot
 be used.</p>
 <p/>
 <p>Note that this method does <b>not</b> do recursive type-checking of the
 sub-expressions.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplied</CODE> - The expression to be type-checked<DD><CODE>req</CODE> - The required type for the context in which the expression is used<DD><CODE>backwardsCompatible</CODE> - True if XPath 1.0 backwards compatibility mode is applicable<DD><CODE>role</CODE> - Information about the role of the subexpression within the
                            containing expression, used to provide useful error messages<DD><CODE>visitor</CODE> - An expression visitor
<DT><B>Returns:</B><DD>The original expression if it is type-safe, or the expression
         wrapped in a run-time type checking expression if not.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the supplied type is statically inconsistent with the
                        required type (that is, if they have no common subtype)</DL>
</DD>
</DL>
<HR>

<A NAME="strictTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.expr.StaticContext)"><!-- --></A><H3>
strictTypeCheck</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>strictTypeCheck</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;supplied,
                                         <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;req,
                                         <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                                         <A HREF="../../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A>&nbsp;env)
                                  throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Check an expression against a required type, modifying it if necessary. This
 is a variant of the method <A HREF="../../../../../net/sf/saxon/expr/parser/TypeChecker.html#staticTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, boolean, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.TypeCheckerEnvironment)"><CODE>staticTypeCheck(net.sf.saxon.expr.Expression, net.sf.saxon.value.SequenceType, boolean, net.sf.saxon.expr.parser.RoleLocator, net.sf.saxon.TypeCheckerEnvironment)</CODE></A> used for expressions that
 declare variables in XQuery. In these contexts, conversions such as numeric
 type promotion and atomization are not allowed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>supplied</CODE> - The expression to be type-checked<DD><CODE>req</CODE> - The required type for the context in which the expression is used<DD><CODE>role</CODE> - Information about the role of the subexpression within the
                 containing expression, used to provide useful error messages<DD><CODE>env</CODE> - The static context containing the types being checked. At present
                 this is used only to locate a NamePool
<DT><B>Returns:</B><DD>The original expression if it is type-safe, or the expression
         wrapped in a run-time type checking expression if not.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the supplied type is statically inconsistent with the
                        required type (that is, if they have no common subtype)</DL>
</DD>
</DL>
<HR>

<A NAME="testConformance(net.sf.saxon.om.ValueRepresentation, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.XPathContext)"><!-- --></A><H3>
testConformance</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A> <B>testConformance</B>(<A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A>&nbsp;val,
                                             <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                                             <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)
                                      throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Test whether a given value conforms to a given type
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>val</CODE> - the value<DD><CODE>requiredType</CODE> - the required type<DD><CODE>context</CODE> - XPath dynamic context
<DT><B>Returns:</B><DD>an XPathException describing the error condition if the value doesn't conform;
         or null if it does.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if a failure occurs reading the value</DL>
</DD>
</DL>
<HR>

<A NAME="ebvError(net.sf.saxon.expr.Expression, net.sf.saxon.type.TypeHierarchy)"><!-- --></A><H3>
ebvError</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A> <B>ebvError</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
                                      <A HREF="../../../../../net/sf/saxon/type/TypeHierarchy.html" title="class in net.sf.saxon.type">TypeHierarchy</A>&nbsp;th)</PRE>
<DL>
<DD>Test whether a given expression is capable of returning a value that has an effective boolean
 value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exp</CODE> - the given expression<DD><CODE>th</CODE> - the type hierarchy cache
<DT><B>Returns:</B><DD>null if the expression is OK (optimistically), an exception object if not</DL>
</DD>
</DL>
<HR>

<A NAME="applyFunctionConversionRules(net.sf.saxon.om.ValueRepresentation, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, javax.xml.transform.SourceLocator, net.sf.saxon.expr.XPathContext)"><!-- --></A><H3>
applyFunctionConversionRules</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/value/Value.html" title="class in net.sf.saxon.value">Value</A> <B>applyFunctionConversionRules</B>(<A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A>&nbsp;value,
                                                 <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                                                 <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                                                 <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A>&nbsp;locator,
                                                 <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)
                                          throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Apply the function conversion rules to a value, given a required type.
 The parameter type S represents the supplied type, R the required type
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - a value to be converted<DD><CODE>requiredType</CODE> - the required type<DD><CODE>context</CODE> - the conversion context
<DT><B>Returns:</B><DD>the converted value
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the value cannot be converted to the required type</DL>
</DD>
</DL>
<HR>

<A NAME="applyFunctionConversionRules(net.sf.saxon.om.SequenceIterator, net.sf.saxon.type.ItemType, net.sf.saxon.value.SequenceType, net.sf.saxon.expr.parser.RoleLocator, javax.xml.transform.SourceLocator, net.sf.saxon.expr.XPathContext)"><!-- --></A><H3>
applyFunctionConversionRules</H3>
<PRE>
public static <A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A> <B>applyFunctionConversionRules</B>(<A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;input,
                                                            <A HREF="../../../../../net/sf/saxon/type/ItemType.html" title="interface in net.sf.saxon.type">ItemType</A>&nbsp;suppliedItemType,
                                                            <A HREF="../../../../../net/sf/saxon/value/SequenceType.html" title="class in net.sf.saxon.value">SequenceType</A>&nbsp;requiredType,
                                                            <A HREF="../../../../../net/sf/saxon/expr/parser/RoleLocator.html" title="class in net.sf.saxon.expr.parser">RoleLocator</A>&nbsp;role,
                                                            <A HREF="http://download.oracle.com/javase/6/docs/api/javax/xml/transform/SourceLocator.html?is-external=true" title="class or interface in javax.xml.transform">SourceLocator</A>&nbsp;locator,
                                                            <A HREF="../../../../../net/sf/saxon/expr/XPathContext.html" title="interface in net.sf.saxon.expr">XPathContext</A>&nbsp;context)
                                                     throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Apply the function conversion rules to a value (represented as an iterator), given a required type.
 The parameter type S represents the supplied type, R the required type
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>input</CODE> - a value to be converted<DD><CODE>suppliedItemType</CODE> - the type of the items in the input<DD><CODE>requiredType</CODE> - the required type<DD><CODE>context</CODE> - the conversion context
<DT><B>Returns:</B><DD>the converted value
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the value cannot be converted to the required type</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/Tokenizer.html" title="class in net.sf.saxon.expr.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/expr/parser/TypeChecker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TypeChecker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.
</BODY>
</HTML>