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
- SHA256Managed.cs
- StickyNoteHelper.cs
- SchemeSettingElementCollection.cs
- XmlDeclaration.cs
- CapabilitiesRule.cs
- FrugalList.cs
- OrthographicCamera.cs
- ParallelTimeline.cs
- Int32AnimationBase.cs
- SemanticBasicElement.cs
- MiniParameterInfo.cs
- ModuleBuilderData.cs
- DesignOnlyAttribute.cs
- HttpListenerContext.cs
- DrawingContextWalker.cs
- FixUp.cs
- ManipulationLogic.cs
- PrintPreviewControl.cs
- EditCommandColumn.cs
- SemaphoreSlim.cs
- MaskInputRejectedEventArgs.cs
- SmiEventSink_Default.cs
- SevenBitStream.cs
- NumberFormatter.cs
- ThemeDirectoryCompiler.cs
- Light.cs
- MouseGestureConverter.cs
- UpdatePanelTrigger.cs
- CreateUserWizardStep.cs
- HitTestWithPointDrawingContextWalker.cs
- WindowAutomationPeer.cs
- PointAnimation.cs
- StreamGeometry.cs
- ControlBindingsConverter.cs
- ToolStripItemEventArgs.cs
- SkipQueryOptionExpression.cs
- ViewStateModeByIdAttribute.cs
- Rectangle.cs
- WeakReadOnlyCollection.cs
- OdbcReferenceCollection.cs
- DetailsViewUpdateEventArgs.cs
- OleDbReferenceCollection.cs
- GridViewActionList.cs
- SqlParameterCollection.cs
- XmlSchemaInfo.cs
- RealProxy.cs
- CompressedStack.cs
- Span.cs
- AssociationSetEnd.cs
- CharAnimationUsingKeyFrames.cs
- PeerNameResolver.cs
- MSG.cs
- FixedTextBuilder.cs
- DesignerAutoFormatStyle.cs
- XmlDataLoader.cs
- StylusPlugInCollection.cs
- CompoundFileReference.cs
- TreeWalker.cs
- ExportOptions.cs
- CodePageUtils.cs
- SecurityVersion.cs
- SizeValueSerializer.cs
- PlaceHolder.cs
- ProcessManager.cs
- FontConverter.cs
- DataGridViewCellCancelEventArgs.cs
- ValuePattern.cs
- TemplateLookupAction.cs
- RegexWorker.cs
- DefaultValueTypeConverter.cs
- CodeTypeReferenceExpression.cs
- AnnotationStore.cs
- CustomErrorsSection.cs
- WebPartTransformerAttribute.cs
- NamespaceCollection.cs
- precedingquery.cs
- ImpersonationContext.cs
- DynamicHyperLink.cs
- ImageKeyConverter.cs
- WebPartChrome.cs
- RegexReplacement.cs
- NavigationWindowAutomationPeer.cs
- AsymmetricSecurityBindingElement.cs
- activationcontext.cs
- BevelBitmapEffect.cs
- BuildProvider.cs
- FastEncoder.cs
- SecurityContext.cs
- ControlCachePolicy.cs
- ConfigurationProperty.cs
- HtmlForm.cs
- NotifyInputEventArgs.cs
- DataRowComparer.cs
- TextFormatterContext.cs
- securitycriticaldataClass.cs
- ListViewItem.cs
- SqlXml.cs
- PolyBezierSegmentFigureLogic.cs
- NetMsmqBindingCollectionElement.cs
- ToRequest.cs