CompilationWarnings EnumerationCompilationWarnings EnumerationCompilationWarnings Enumeration

Specifies which warnings should be raised during compilation.

This enumeration has a FlagsAttributeFlagsAttributeFlagsAttribute attribute that allows a bitwise combination of its member values.

Syntax

Public Enumeration CompilationWarnings
public enum CompilationWarnings
public:
enum CompilationWarnings
 
The CompilationWarningsCompilationWarningsCompilationWarnings type exposes the following members.

Members

 MemberDescription
MemberAllAllAll Enables all compilation warnings
MemberDynamicErrorsDynamicErrorsDynamicErrors Issue a warning when dynamic errors are detected statically by the compiler.
MemberEmptySequenceEmptySequenceEmptySequence Issue a warning for expressions whose static type is determined to be empty-sequence().
MemberNoneNoneNone No extra compilation settings are enabled.
MemberOtherOtherOther Issue a warning in other cases (eg. encoding declaration does not match the encoding of the query)
MemberPathReturnsConstructedNodesPathReturnsConstructedNodesPathReturnsConstructedNodes A path expression returns constructed nodes, and so the order is not defined.
MemberScriptCompilationWarningScriptCompilationWarningScriptCompilationWarning A warning arising from compiling an external script in a <xp:script> or <msxsl:script> element.
MemberUnreachableCodeUnreachableCodeUnreachableCode Issue a warning for expressions which can never be executed.
MemberUnusedVariableUnusedVariableUnusedVariable Issue a warning for variables that are declared but not used.

Top

Remarks

Compiler warnings indicate constructs in XQuery programs, XPath expressions or XSL transformations which, while not erroneous, may indicate unintended behaviour or an accidental mistake.

Use the CompilationWarningsCompilationWarningsCompilationWarnings property to set the warnings that should be raised during the compilation of an XQuery program, an XPath expression or an XSL transformation.