C# Class System.Xml.Xsl.Runtime.XmlQueryOutput

Inheritance: System.Xml.XmlWriter
Show file Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Private Properties

Property Type Description
AddNamespace void
CheckAttributePrefix string
ConstructInEnumAttrs void
ConstructWithinContent void
CopyNamespaces void
CopyNamespacesHelper void
CopyNode void
EndCopy void
EnsureValidName string
PopElementNames void
PushElementNames void
RemapPrefix string
SetWrappedWriter void
StartCopy bool
ThrowInvalidStateError void
WriteCachedNamespaces void
WriteStartComputed void
WriteStartComputed void
WriteStartComputed void
WriteStartComputed void
WriteString void
XmlQueryOutput System
XmlQueryOutput System
XmlStateToNodeType XPathNodeType

Public Methods

Method Description
Close ( ) : void

No-op.

EndCopy ( XPathNavigator navigator ) : void

End shallow copy of the navigator's current node. Should be called only for Element and Document nodes.

EndTree ( ) : void

Call XmlSequenceWriter.EndTree().

Flush ( ) : void

No-op.

LookupPrefix ( string ns ) : string

Should never be called.

StartCopy ( XPathNavigator navigator ) : bool

Begin shallow copy of the navigator's current node to output. Returns true if EndCopy should be called to complete the copy operation. Automatically copies all in-scope namespaces on elements.

StartElementContentUnchecked ( ) : void

Call XmlRawWriter.StartElementContent().

StartTree ( XPathNodeType rootType ) : void

Call XmlSequenceWriter.StartTree() in order to start construction of a new tree.

WriteBase64 ( byte buffer, int index, int count ) : void

Should never be called.

WriteCData ( string text ) : void

Write CData text as regular text.

WriteCharEntity ( char ch ) : void

Should never be called.

WriteChars ( char buffer, int index, int count ) : void

Before writing text, perform various checks to ensure well-formedness.

WriteComment ( string text ) : void

Before writing a comment, perform various checks to ensure well-formedness.

WriteCommentString ( string text ) : void

Cache the comment's text.

WriteDocType ( string name, string pubid, string sysid, string subset ) : void

Should never be called.

WriteEndAttribute ( ) : void

Before calling XmlRawWriter.WriteEndAttribute(), perform various checks to ensure well-formedness.

WriteEndAttributeUnchecked ( ) : void

XmlRawWriter.WriteEndAttribute().

WriteEndComment ( ) : void

Before writing a comment, perform various checks to ensure well-formedness.

WriteEndDocument ( ) : void

Should never be called.

WriteEndElement ( ) : void

Before calling XmlRawWriter.WriteEndElement(), perform various checks to ensure well-formedness.

WriteEndElementUnchecked ( string localName ) : void

Call XmlRawWriter.WriteEndElement() with empty prefix, ns.

WriteEndElementUnchecked ( string prefix, string localName, string ns ) : void

Call XmlRawWriter.WriteEndElement() with prefix, local-name, and ns.

WriteEndNamespace ( ) : void

Before writing a namespace, perform various checks to ensure well-formedness.

WriteEndProcessingInstruction ( ) : void

Before writing a processing instruction, perform various checks to ensure well-formedness.

WriteEndRoot ( ) : void

Call XmlSequenceWriter.EndTree() and reset state.

WriteEntityRef ( string name ) : void

Should never be called.

WriteFullEndElement ( ) : void

Same as calling WriteEndElement().

WriteItem ( XPathItem item ) : void

Write an item to output. If currently constructing an Xml tree, then the item is always copied. At the top-level, the item's identity is preserved unless it's an atomic value.

WriteNamespaceDeclaration ( string prefix, string ns ) : void

Before calling XmlRawWriter.WriteNamespaceDeclaration(), perform various checks to ensure well-formedness.

WriteNamespaceDeclarationUnchecked ( string prefix, string ns ) : void

Add a new namespace declaration -- xmlns:prefix="ns" -- to the set of in-scope declarations. NOTE: This method should only be called if caller can guarantee that the current state is EnumAttrs and that there will be no namespace conflicts in the current scope (e.g. trying to map the same prefix to different namespaces within the same element start tag). If no such guarantees exist, then WriteNamespaceDeclaration() should be called instead.

WriteNamespaceString ( string text ) : void

Cache the namespace's text.

WriteProcessingInstruction ( string target, string text ) : void

Before writing a processing instruction, perform various checks to ensure well-formedness.

WriteProcessingInstructionString ( string text ) : void

Cache the processing instruction's text.

WriteRaw ( char buffer, int index, int count ) : void

Write text, but do not escape special characters.

WriteRaw ( string data ) : void

Write text, but do not escape special characters.

WriteRawUnchecked ( string text ) : void

Write a text block without escaping special characters.

WriteStartAttribute ( string prefix, string localName, string ns ) : void

Before calling XmlRawWriter.WriteStartAttribute(), perform various checks to ensure well-formedness.

WriteStartAttributeComputed ( XPathNavigator navigator ) : void

Write an attribute with a name that is copied from the navigator.

WriteStartAttributeComputed ( XmlQualifiedName name ) : void

Write an attribute with a name that is derived from the XmlQualifiedName.

WriteStartAttributeComputed ( string tagName, int prefixMappingsIndex ) : void

Write an attribute with a name that is computed from a "prefix:localName" tag name and a set of prefix mappings.

WriteStartAttributeComputed ( string tagName, string ns ) : void

Write an attribute with a name that is computed from a "prefix:localName" tag name and a namespace URI.

WriteStartAttributeLocalName ( string localName ) : void

WriteStartAttribute() with empty prefix, ns, and null schema type.

WriteStartAttributeUnchecked ( string localName ) : void

XmlRawWriter.WriteStartAttribute() with empty prefix, ns, and null schema type.

WriteStartAttributeUnchecked ( string prefix, string localName, string ns ) : void

XmlRawWriter.WriteStartAttribute() with prefix, local-name, ns, and schema type.

WriteStartComment ( ) : void

Before writing a comment, perform various checks to ensure well-formedness.

WriteStartDocument ( ) : void

Should never be called.

WriteStartDocument ( bool standalone ) : void

Should never be called.

WriteStartElement ( string prefix, string localName, string ns ) : void

Before calling XmlRawWriter.WriteStartElement(), perform various checks to ensure well-formedness.

WriteStartElementComputed ( XPathNavigator navigator ) : void

Write an element with a name that is copied from the navigator.

WriteStartElementComputed ( XmlQualifiedName name ) : void

Write an element with a name that is derived from the XmlQualifiedName.

WriteStartElementComputed ( string tagName, int prefixMappingsIndex ) : void

Write an element with a name that is computed from a "prefix:localName" tag name and a set of prefix mappings.

WriteStartElementComputed ( string tagName, string ns ) : void

Write an element with a name that is computed from a "prefix:localName" tag name and a namespace URI.

WriteStartElementLocalName ( string localName ) : void

WriteStartElement() with empty prefix, ns.

WriteStartElementUnchecked ( string localName ) : void

Call XmlRawWriter.WriteStartElement() with empty prefix, ns, and null schema type.

WriteStartElementUnchecked ( string prefix, string localName, string ns ) : void

Call XmlRawWriter.WriteStartElement() with prefix, local-name, ns, and schema type.

WriteStartNamespace ( string prefix ) : void

Before writing a namespace, perform various checks to ensure well-formedness.

WriteStartProcessingInstruction ( string target ) : void

Before writing a processing instruction, perform various checks to ensure well-formedness.

WriteStartRoot ( ) : void

Before calling XmlSequenceWriter.StartTree(), perform checks to ensure well-formedness.

WriteString ( string text ) : void

Before writing text, perform various checks to ensure well-formedness.

WriteStringUnchecked ( string text ) : void

Write a text block to the XmlRawWriter.

WriteSurrogateCharEntity ( char lowChar, char highChar ) : void

Should never be called.

WriteWhitespace ( string ws ) : void

Treat whitespace as regular text.

XsltCopyOf ( XPathNavigator navigator ) : void

Copy a node by value to output according to Xslt rules: 1. Identity is never preserved 2. If the item is an Rtf, preserve serialization hints when copying. 3. If the item is a Root node, copy the children of the Root

Private Methods

Method Description
AddNamespace ( string prefix, string ns ) : void

Add an in-scope namespace.

CheckAttributePrefix ( string prefix, string ns ) : string

If attribute's prefix conflicts with other prefixes then redeclare the prefix. If the prefix has not yet been declared, then add it to the namespace manager.

ConstructInEnumAttrs ( XPathNodeType rootType ) : void

Ensure that state transitions to EnumAttrs.

ConstructWithinContent ( XPathNodeType rootType ) : void

Ensure that state transitions to WithinContent.

CopyNamespaces ( XPathNavigator navigator, XPathNamespaceScope nsScope ) : void

Copy all namespaces of the specified type (in-scope, exclude-xml, local) in document order to output.

CopyNamespacesHelper ( XPathNavigator navigator, XPathNamespaceScope nsScope ) : void

Recursive helper function that reverses order of the namespaces retrieved by MoveToFirstNamespace and MoveToNextNamespace.

CopyNode ( XPathNavigator navigator ) : void

Deep copy the subtree that is rooted at this navigator's current position to output. If the current item is an element, copy all in-scope namespace nodes.

EndCopy ( XPathNavigator navigator, bool callChk ) : void

End shallow copy of the navigator's current node to output. This method should only be called if StartCopy returned true.

EnsureValidName ( string prefix, string localName, string ns, XPathNodeType nodeType ) : string

Ensure that the specified name parts are valid according to Xml 1.0 and Namespace 1.0 rules. Try to remap the prefix in order to attain validity. Throw if validity is not possible. Otherwise, return the (possibly remapped) prefix.

PopElementNames ( string &prefix, string &localName, string &ns ) : void

Pop element name parts from the stack.

PushElementNames ( string prefix, string localName, string ns ) : void

Push element name parts onto the stack.

RemapPrefix ( string prefix, string ns, bool isElemPrefix ) : string

Remaps an element or attribute prefix using the following rules: 1. If another in-scope prefix is already mapped to "ns", then use that 2. Otherwise, if a prefix was previously mapped to "ns" by this method, then use that 3. Otherwise, generate a new prefix of the form 'xp_??', where ?? is a stringized counter These rules tend to reduce the number of unique prefixes used throughout the tree.

SetWrappedWriter ( XmlRawWriter writer ) : void

This method will be called if "xwrt" is a writer which no longer needs to be part of the pipeline and wishes to replace itself with a different writer. For example, the auto-detect writer replaces itself with the Html or Xml writer once it has determined which output mode to use.

StartCopy ( XPathNavigator navigator, bool callChk ) : bool

Begin shallow copy of the navigator's current node to output. Returns true if EndCopy should be called to complete the copy operation.

ThrowInvalidStateError ( XPathNodeType constructorType ) : void

Throw an invalid state transition error.

WriteCachedNamespaces ( ) : void

Namespace declarations are added to this.nsmgr. Just before element content has begun, write out all namespaces that were declared locally on the element.

WriteStartComputed ( XPathNodeType nodeType, XPathNavigator navigator ) : void

Write an element or attribute with a name that is copied from the navigator.

WriteStartComputed ( XPathNodeType nodeType, XmlQualifiedName name ) : void

Write an element or attribute with a name that is derived from the XmlQualifiedName.

WriteStartComputed ( XPathNodeType nodeType, string tagName, int prefixMappingsIndex ) : void

Write an element or attribute with a name that is computed from a "prefix:localName" tag name and a set of prefix mappings.

WriteStartComputed ( XPathNodeType nodeType, string tagName, string ns ) : void

Write an element or attribute with a name that is computed from a "prefix:localName" tag name and a namespace URI.

WriteString ( string text, bool disableOutputEscaping ) : void

Before writing text, perform various checks to ensure well-formedness.

XmlQueryOutput ( XmlQueryRuntime runtime, XmlEventCache xwrt ) : System

This constructor is internal so that external users cannot construct it (and therefore we do not have to test it separately). Initialize output state to accept Rtf content (top-level sequences are therefore prohibited).

XmlQueryOutput ( XmlQueryRuntime runtime, XmlSequenceWriter seqwrt ) : System

This constructor is internal so that external users cannot construct it (and therefore we do not have to test it separately). Initialize output state to accept top-level sequences.

XmlStateToNodeType ( XmlState xstate ) : XPathNodeType

Return the type of node that is under construction given the specified XmlState.

Method Details

Close() public method

No-op.
public Close ( ) : void
return void

EndCopy() public method

End shallow copy of the navigator's current node. Should be called only for Element and Document nodes.
public EndCopy ( XPathNavigator navigator ) : void
navigator System.Xml.XPath.XPathNavigator
return void

EndTree() public method

Call XmlSequenceWriter.EndTree().
public EndTree ( ) : void
return void

Flush() public method

No-op.
public Flush ( ) : void
return void

LookupPrefix() public method

Should never be called.
public LookupPrefix ( string ns ) : string
ns string
return string

StartCopy() public method

Begin shallow copy of the navigator's current node to output. Returns true if EndCopy should be called to complete the copy operation. Automatically copies all in-scope namespaces on elements.
public StartCopy ( XPathNavigator navigator ) : bool
navigator System.Xml.XPath.XPathNavigator
return bool

StartElementContentUnchecked() public method

Call XmlRawWriter.StartElementContent().
public StartElementContentUnchecked ( ) : void
return void

StartTree() public method

Call XmlSequenceWriter.StartTree() in order to start construction of a new tree.
public StartTree ( XPathNodeType rootType ) : void
rootType XPathNodeType
return void

WriteBase64() public method

Should never be called.
public WriteBase64 ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
return void

WriteCData() public method

Write CData text as regular text.
public WriteCData ( string text ) : void
text string
return void

WriteCharEntity() public method

Should never be called.
public WriteCharEntity ( char ch ) : void
ch char
return void

WriteChars() public method

Before writing text, perform various checks to ensure well-formedness.
public WriteChars ( char buffer, int index, int count ) : void
buffer char
index int
count int
return void

WriteComment() public method

Before writing a comment, perform various checks to ensure well-formedness.
public WriteComment ( string text ) : void
text string
return void

WriteCommentString() public method

Cache the comment's text.
public WriteCommentString ( string text ) : void
text string
return void

WriteDocType() public method

Should never be called.
public WriteDocType ( string name, string pubid, string sysid, string subset ) : void
name string
pubid string
sysid string
subset string
return void

WriteEndAttribute() public method

Before calling XmlRawWriter.WriteEndAttribute(), perform various checks to ensure well-formedness.
public WriteEndAttribute ( ) : void
return void

WriteEndAttributeUnchecked() public method

XmlRawWriter.WriteEndAttribute().
public WriteEndAttributeUnchecked ( ) : void
return void

WriteEndComment() public method

Before writing a comment, perform various checks to ensure well-formedness.
public WriteEndComment ( ) : void
return void

WriteEndDocument() public method

Should never be called.
public WriteEndDocument ( ) : void
return void

WriteEndElement() public method

Before calling XmlRawWriter.WriteEndElement(), perform various checks to ensure well-formedness.
public WriteEndElement ( ) : void
return void

WriteEndElementUnchecked() public method

Call XmlRawWriter.WriteEndElement() with empty prefix, ns.
public WriteEndElementUnchecked ( string localName ) : void
localName string
return void

WriteEndElementUnchecked() public method

Call XmlRawWriter.WriteEndElement() with prefix, local-name, and ns.
public WriteEndElementUnchecked ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteEndNamespace() public method

Before writing a namespace, perform various checks to ensure well-formedness.
public WriteEndNamespace ( ) : void
return void

WriteEndProcessingInstruction() public method

Before writing a processing instruction, perform various checks to ensure well-formedness.
public WriteEndProcessingInstruction ( ) : void
return void

WriteEndRoot() public method

Call XmlSequenceWriter.EndTree() and reset state.
public WriteEndRoot ( ) : void
return void

WriteEntityRef() public method

Should never be called.
public WriteEntityRef ( string name ) : void
name string
return void

WriteFullEndElement() public method

Same as calling WriteEndElement().
public WriteFullEndElement ( ) : void
return void

WriteItem() public method

Write an item to output. If currently constructing an Xml tree, then the item is always copied. At the top-level, the item's identity is preserved unless it's an atomic value.
public WriteItem ( XPathItem item ) : void
item System.Xml.XPath.XPathItem
return void

WriteNamespaceDeclaration() public method

Before calling XmlRawWriter.WriteNamespaceDeclaration(), perform various checks to ensure well-formedness.
public WriteNamespaceDeclaration ( string prefix, string ns ) : void
prefix string
ns string
return void

WriteNamespaceDeclarationUnchecked() public method

Add a new namespace declaration -- xmlns:prefix="ns" -- to the set of in-scope declarations. NOTE: This method should only be called if caller can guarantee that the current state is EnumAttrs and that there will be no namespace conflicts in the current scope (e.g. trying to map the same prefix to different namespaces within the same element start tag). If no such guarantees exist, then WriteNamespaceDeclaration() should be called instead.
public WriteNamespaceDeclarationUnchecked ( string prefix, string ns ) : void
prefix string
ns string
return void

WriteNamespaceString() public method

Cache the namespace's text.
public WriteNamespaceString ( string text ) : void
text string
return void

WriteProcessingInstruction() public method

Before writing a processing instruction, perform various checks to ensure well-formedness.
public WriteProcessingInstruction ( string target, string text ) : void
target string
text string
return void

WriteProcessingInstructionString() public method

Cache the processing instruction's text.
public WriteProcessingInstructionString ( string text ) : void
text string
return void

WriteRaw() public method

Write text, but do not escape special characters.
public WriteRaw ( char buffer, int index, int count ) : void
buffer char
index int
count int
return void

WriteRaw() public method

Write text, but do not escape special characters.
public WriteRaw ( string data ) : void
data string
return void

WriteRawUnchecked() public method

Write a text block without escaping special characters.
public WriteRawUnchecked ( string text ) : void
text string
return void

WriteStartAttribute() public method

Before calling XmlRawWriter.WriteStartAttribute(), perform various checks to ensure well-formedness.
public WriteStartAttribute ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteStartAttributeComputed() public method

Write an attribute with a name that is copied from the navigator.
public WriteStartAttributeComputed ( XPathNavigator navigator ) : void
navigator System.Xml.XPath.XPathNavigator
return void

WriteStartAttributeComputed() public method

Write an attribute with a name that is derived from the XmlQualifiedName.
public WriteStartAttributeComputed ( XmlQualifiedName name ) : void
name System.Xml.XmlQualifiedName
return void

WriteStartAttributeComputed() public method

Write an attribute with a name that is computed from a "prefix:localName" tag name and a set of prefix mappings.
public WriteStartAttributeComputed ( string tagName, int prefixMappingsIndex ) : void
tagName string
prefixMappingsIndex int
return void

WriteStartAttributeComputed() public method

Write an attribute with a name that is computed from a "prefix:localName" tag name and a namespace URI.
public WriteStartAttributeComputed ( string tagName, string ns ) : void
tagName string
ns string
return void

WriteStartAttributeLocalName() public method

WriteStartAttribute() with empty prefix, ns, and null schema type.
public WriteStartAttributeLocalName ( string localName ) : void
localName string
return void

WriteStartAttributeUnchecked() public method

XmlRawWriter.WriteStartAttribute() with empty prefix, ns, and null schema type.
public WriteStartAttributeUnchecked ( string localName ) : void
localName string
return void

WriteStartAttributeUnchecked() public method

XmlRawWriter.WriteStartAttribute() with prefix, local-name, ns, and schema type.
public WriteStartAttributeUnchecked ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteStartComment() public method

Before writing a comment, perform various checks to ensure well-formedness.
public WriteStartComment ( ) : void
return void

WriteStartDocument() public method

Should never be called.
public WriteStartDocument ( ) : void
return void

WriteStartDocument() public method

Should never be called.
public WriteStartDocument ( bool standalone ) : void
standalone bool
return void

WriteStartElement() public method

Before calling XmlRawWriter.WriteStartElement(), perform various checks to ensure well-formedness.
public WriteStartElement ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteStartElementComputed() public method

Write an element with a name that is copied from the navigator.
public WriteStartElementComputed ( XPathNavigator navigator ) : void
navigator System.Xml.XPath.XPathNavigator
return void

WriteStartElementComputed() public method

Write an element with a name that is derived from the XmlQualifiedName.
public WriteStartElementComputed ( XmlQualifiedName name ) : void
name System.Xml.XmlQualifiedName
return void

WriteStartElementComputed() public method

Write an element with a name that is computed from a "prefix:localName" tag name and a set of prefix mappings.
public WriteStartElementComputed ( string tagName, int prefixMappingsIndex ) : void
tagName string
prefixMappingsIndex int
return void

WriteStartElementComputed() public method

Write an element with a name that is computed from a "prefix:localName" tag name and a namespace URI.
public WriteStartElementComputed ( string tagName, string ns ) : void
tagName string
ns string
return void

WriteStartElementLocalName() public method

WriteStartElement() with empty prefix, ns.
public WriteStartElementLocalName ( string localName ) : void
localName string
return void

WriteStartElementUnchecked() public method

Call XmlRawWriter.WriteStartElement() with empty prefix, ns, and null schema type.
public WriteStartElementUnchecked ( string localName ) : void
localName string
return void

WriteStartElementUnchecked() public method

Call XmlRawWriter.WriteStartElement() with prefix, local-name, ns, and schema type.
public WriteStartElementUnchecked ( string prefix, string localName, string ns ) : void
prefix string
localName string
ns string
return void

WriteStartNamespace() public method

Before writing a namespace, perform various checks to ensure well-formedness.
public WriteStartNamespace ( string prefix ) : void
prefix string
return void

WriteStartProcessingInstruction() public method

Before writing a processing instruction, perform various checks to ensure well-formedness.
public WriteStartProcessingInstruction ( string target ) : void
target string
return void

WriteStartRoot() public method

Before calling XmlSequenceWriter.StartTree(), perform checks to ensure well-formedness.
public WriteStartRoot ( ) : void
return void

WriteString() public method

Before writing text, perform various checks to ensure well-formedness.
public WriteString ( string text ) : void
text string
return void

WriteStringUnchecked() public method

Write a text block to the XmlRawWriter.
public WriteStringUnchecked ( string text ) : void
text string
return void

WriteSurrogateCharEntity() public method

Should never be called.
public WriteSurrogateCharEntity ( char lowChar, char highChar ) : void
lowChar char
highChar char
return void

WriteWhitespace() public method

Treat whitespace as regular text.
public WriteWhitespace ( string ws ) : void
ws string
return void

XsltCopyOf() public method

Copy a node by value to output according to Xslt rules: 1. Identity is never preserved 2. If the item is an Rtf, preserve serialization hints when copying. 3. If the item is a Root node, copy the children of the Root
public XsltCopyOf ( XPathNavigator navigator ) : void
navigator System.Xml.XPath.XPathNavigator
return void