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
- ReadOnlyDictionary.cs
- ViewStateException.cs
- UnsafeNativeMethodsTablet.cs
- InstanceCreationEditor.cs
- sqlser.cs
- CookielessHelper.cs
- WindowsRegion.cs
- TypeNameConverter.cs
- EpmContentDeSerializerBase.cs
- CancellationToken.cs
- CompilerCollection.cs
- TextEditorSpelling.cs
- SymbolMethod.cs
- DetailsViewRowCollection.cs
- GenericArgumentsUpdater.cs
- Preprocessor.cs
- MessageSmuggler.cs
- VisualBrush.cs
- FillBehavior.cs
- TokenFactoryFactory.cs
- BamlReader.cs
- ThreadInterruptedException.cs
- OneOfTypeConst.cs
- EmbeddedMailObjectsCollection.cs
- DeferredTextReference.cs
- SamlConstants.cs
- FileRecordSequence.cs
- HttpListener.cs
- EllipseGeometry.cs
- SafeTimerHandle.cs
- EventManager.cs
- AppSettingsExpressionBuilder.cs
- ProcessHostMapPath.cs
- PointHitTestResult.cs
- CreatingCookieEventArgs.cs
- QilInvokeEarlyBound.cs
- HttpServerUtilityWrapper.cs
- ClockGroup.cs
- CheckBoxPopupAdapter.cs
- DocumentPropertiesDialog.cs
- EntityViewGenerationAttribute.cs
- SafeNativeMethods.cs
- ListViewItemEventArgs.cs
- DataTemplateKey.cs
- BitmapSizeOptions.cs
- IntermediatePolicyValidator.cs
- RawStylusInputCustomData.cs
- ReadOnlyDictionary.cs
- HeaderedContentControl.cs
- ConnectionManagementElement.cs
- ImageMapEventArgs.cs
- FileDetails.cs
- FixedMaxHeap.cs
- PackageRelationshipCollection.cs
- BaseComponentEditor.cs
- MetadataWorkspace.cs
- AggregateNode.cs
- Binding.cs
- XmlBinaryReaderSession.cs
- DbDataAdapter.cs
- QilChoice.cs
- Main.cs
- GridItemCollection.cs
- MasterPage.cs
- XamlContextStack.cs
- ConditionCollection.cs
- FieldValue.cs
- ISFClipboardData.cs
- SchemaNotation.cs
- Compiler.cs
- FormViewPageEventArgs.cs
- QilStrConcat.cs
- EncoderExceptionFallback.cs
- ListMarkerLine.cs
- TextContainerChangeEventArgs.cs
- _SafeNetHandles.cs
- IPAddressCollection.cs
- Int64.cs
- TemplateControlBuildProvider.cs
- CommonDialog.cs
- EmbossBitmapEffect.cs
- RSAPKCS1SignatureDeformatter.cs
- SafeTimerHandle.cs
- FixedElement.cs
- DataGridViewTopLeftHeaderCell.cs
- DiscardableAttribute.cs
- SafeCryptoHandles.cs
- ElementUtil.cs
- DependencyObjectProvider.cs
- PasswordBox.cs
- MemoryPressure.cs
- TextTreeExtractElementUndoUnit.cs
- DataGridViewDataErrorEventArgs.cs
- ClientType.cs
- ZipPackage.cs
- DrawListViewColumnHeaderEventArgs.cs
- StoreAnnotationsMap.cs
- CalendarAutomationPeer.cs
- LoadItemsEventArgs.cs
- Attributes.cs