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
- SQLUtility.cs
- WorkflowServiceHostFactory.cs
- BindingGroup.cs
- AppliedDeviceFiltersEditor.cs
- DriveNotFoundException.cs
- SoapCommonClasses.cs
- ToolTip.cs
- TemplateControlParser.cs
- WrappedDispatcherException.cs
- TextBoxView.cs
- ZipIOExtraField.cs
- ObjectCloneHelper.cs
- diagnosticsswitches.cs
- BulletDecorator.cs
- WorkflowInstanceRecord.cs
- PerfCounters.cs
- MappableObjectManager.cs
- RoleGroupCollection.cs
- LockedHandleGlyph.cs
- EventManager.cs
- GeometryDrawing.cs
- __TransparentProxy.cs
- DbConnectionFactory.cs
- StringConverter.cs
- EFAssociationProvider.cs
- ItemsPresenter.cs
- AsyncPostBackErrorEventArgs.cs
- SymDocumentType.cs
- CryptoApi.cs
- DirectionalLight.cs
- RTLAwareMessageBox.cs
- RenderOptions.cs
- PerformanceCounterLib.cs
- DynamicEntity.cs
- DefaultTextStore.cs
- DataKey.cs
- PagerSettings.cs
- SerializationUtilities.cs
- ParameterCollection.cs
- WsdlBuildProvider.cs
- UnmanagedMemoryStream.cs
- CFStream.cs
- CipherData.cs
- ListViewInsertedEventArgs.cs
- EntityModelBuildProvider.cs
- DispatchChannelSink.cs
- StreamInfo.cs
- Transform3D.cs
- WebFormsRootDesigner.cs
- RegexFCD.cs
- WindowsListViewItemCheckBox.cs
- DiscoveryDocument.cs
- PropertyDescriptorComparer.cs
- FamilyTypefaceCollection.cs
- FormsAuthenticationTicket.cs
- TrackBarDesigner.cs
- SqlDataReaderSmi.cs
- DbExpressionVisitor.cs
- ButtonRenderer.cs
- TextServicesCompartmentEventSink.cs
- securitycriticaldataClass.cs
- HttpCookiesSection.cs
- TransactionScopeDesigner.cs
- TextTreeText.cs
- RotateTransform.cs
- HtmlLabelAdapter.cs
- Triplet.cs
- ServiceDescriptions.cs
- MouseWheelEventArgs.cs
- ExceptionUtil.cs
- CompositeDataBoundControl.cs
- EditorZone.cs
- XmlSchemaType.cs
- ListView.cs
- AppearanceEditorPart.cs
- PeerNeighborManager.cs
- VectorKeyFrameCollection.cs
- SoapParser.cs
- ZipIOExtraField.cs
- Roles.cs
- Queue.cs
- ExceptionHandlersDesigner.cs
- TemplateControlParser.cs
- HtmlFormAdapter.cs
- StoreItemCollection.Loader.cs
- CodeTypeMemberCollection.cs
- BitmapScalingModeValidation.cs
- CodeTypeParameter.cs
- DomainConstraint.cs
- Size3DConverter.cs
- DataSourceXmlClassAttribute.cs
- GridErrorDlg.cs
- ObjectSecurityT.cs
- ContentOperations.cs
- COM2PictureConverter.cs
- HtmlLiteralTextAdapter.cs
- StructureChangedEventArgs.cs
- IChannel.cs
- IconBitmapDecoder.cs
- DataGridViewCell.cs