Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1305376 / BeginEvent.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml.Xsl.XsltOld {
using Res = System.Xml.Utils.Res;
using System;
using System.Diagnostics;
using System.Xml;
using System.Xml.XPath;
internal class BeginEvent : Event {
private XPathNodeType nodeType;
private string namespaceUri;
private string name;
private string prefix;
private bool empty;
private object htmlProps;
#if DEBUG
private bool replaceNSAliasesDone;
#endif
public BeginEvent(Compiler compiler) {
NavigatorInput input = compiler.Input;
Debug.Assert(input != null);
Debug.Assert(input.NodeType != XPathNodeType.Namespace);
this.nodeType = input.NodeType;
this.namespaceUri = input.NamespaceURI;
this.name = input.LocalName;
this.prefix = input.Prefix;
this.empty = input.IsEmptyTag;
if (nodeType == XPathNodeType.Element) {
this.htmlProps = HtmlElementProps.GetProps(this.name);
}
else if (nodeType == XPathNodeType.Attribute) {
this.htmlProps = HtmlAttributeProps.GetProps(this.name);
}
}
public override void ReplaceNamespaceAlias(Compiler compiler){
#if DEBUG
Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad.");
replaceNSAliasesDone = true;
#endif
if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) {
return ; // '#default' aren't apply to attributes.
}
NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri);
if (ResultURIInfo != null) {
this.namespaceUri = ResultURIInfo.nameSpace;
if (ResultURIInfo.prefix != null) {
this.prefix = ResultURIInfo.prefix;
}
}
}
public override bool Output(Processor processor, ActionFrame frame) {
return processor.BeginEvent(this.nodeType, this.prefix, this.name, this.namespaceUri, this.empty, this.htmlProps, false);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IntegerFacetDescriptionElement.cs
- TemplatePropertyEntry.cs
- WinFormsComponentEditor.cs
- ResourceProviderFactory.cs
- WinOEToolBoxItem.cs
- TriggerBase.cs
- PropertiesTab.cs
- SerializationSectionGroup.cs
- EdgeModeValidation.cs
- ProcessHost.cs
- Rotation3DAnimationBase.cs
- ControlLocalizer.cs
- ServerIdentity.cs
- CommonDialog.cs
- ArrayConverter.cs
- ImageDrawing.cs
- FormView.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SubstitutionList.cs
- XmlAttributeHolder.cs
- OciLobLocator.cs
- ServiceObjectContainer.cs
- SQLBinaryStorage.cs
- PartBasedPackageProperties.cs
- LoginView.cs
- SqlCommand.cs
- X509AsymmetricSecurityKey.cs
- Transform3DGroup.cs
- IndentedWriter.cs
- XmlRootAttribute.cs
- SiteMapDataSourceDesigner.cs
- DateTimeConverter2.cs
- RowSpanVector.cs
- ComboBox.cs
- ParameterCollection.cs
- SetIterators.cs
- FileEnumerator.cs
- XPathMultyIterator.cs
- ToolStripDropTargetManager.cs
- BlockCollection.cs
- CurrentChangingEventManager.cs
- TextElementEnumerator.cs
- DetailsViewRow.cs
- ButtonChrome.cs
- PathTooLongException.cs
- SqlBulkCopy.cs
- PrintDocument.cs
- entityreference_tresulttype.cs
- ExtendedPropertyDescriptor.cs
- PropertyManager.cs
- X509Extension.cs
- NamedElement.cs
- QilReplaceVisitor.cs
- StylusPointDescription.cs
- DataGridViewRowPrePaintEventArgs.cs
- ResourceCategoryAttribute.cs
- CodeTypeOfExpression.cs
- HashCodeCombiner.cs
- oledbmetadatacolumnnames.cs
- MulticastIPAddressInformationCollection.cs
- TextTreePropertyUndoUnit.cs
- SafeLocalMemHandle.cs
- DetailsViewActionList.cs
- CryptoProvider.cs
- DataRow.cs
- FlowDocumentReaderAutomationPeer.cs
- StringWriter.cs
- DecoderBestFitFallback.cs
- BuildProviderAppliesToAttribute.cs
- MappingException.cs
- ObjectDataSource.cs
- XPathParser.cs
- OdbcErrorCollection.cs
- MimeParameterWriter.cs
- InternalsVisibleToAttribute.cs
- MetadataProperty.cs
- _ConnectionGroup.cs
- PackageStore.cs
- SqlGatherConsumedAliases.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ClientScriptManagerWrapper.cs
- CalendarSelectionChangedEventArgs.cs
- CustomValidator.cs
- WindowCollection.cs
- ToolStripProgressBar.cs
- BypassElementCollection.cs
- SecureConversationVersion.cs
- InputScopeAttribute.cs
- HttpRequestCacheValidator.cs
- PerspectiveCamera.cs
- OrderByQueryOptionExpression.cs
- StandardCommands.cs
- OleDbConnectionInternal.cs
- DataServiceQueryProvider.cs
- _IPv6Address.cs
- SqlOuterApplyReducer.cs
- ErrorsHelper.cs
- DataGridRowEventArgs.cs
- RichTextBox.cs
- OperatingSystem.cs