internal bool CopyBeginEvent(XPathNavigator node, bool emptyflag) {
switch (node.NodeType) {
case XPathNodeType.Element:
case XPathNodeType.Attribute:
case XPathNodeType.ProcessingInstruction:
case XPathNodeType.Comment:
return BeginEvent(node.NodeType, node.Prefix, node.LocalName, node.NamespaceURI, emptyflag);
case XPathNodeType.Namespace:
// value instead of namespace here!
return BeginEvent(XPathNodeType.Namespace, null, node.LocalName, node.Value, false);
case XPathNodeType.Text:
// Text will be copied in CopyContents();
break;
case XPathNodeType.Root:
case XPathNodeType.Whitespace:
case XPathNodeType.SignificantWhitespace:
case XPathNodeType.All:
break;
default:
Debug.Fail("Invalid XPathNodeType in CopyBeginEvent");
break;
}
return true;
}