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
- BufferModesCollection.cs
- BulletDecorator.cs
- RawStylusSystemGestureInputReport.cs
- SignedXml.cs
- CommandCollectionEditor.cs
- XmlName.cs
- FixedBufferAttribute.cs
- StringInfo.cs
- WindowsProgressbar.cs
- Utils.cs
- HelpProvider.cs
- QuinticEase.cs
- Model3DCollection.cs
- WebServiceClientProxyGenerator.cs
- PackWebRequest.cs
- SecurityException.cs
- Stroke2.cs
- MemberHolder.cs
- HealthMonitoringSection.cs
- ApplicationServiceHelper.cs
- RtfFormatStack.cs
- HttpWebRequest.cs
- DynamicQueryableWrapper.cs
- GACMembershipCondition.cs
- IIS7UserPrincipal.cs
- ReferenceSchema.cs
- DependencyPropertyConverter.cs
- HwndMouseInputProvider.cs
- MediaElementAutomationPeer.cs
- LocatorManager.cs
- BaseTemplateBuildProvider.cs
- TraceSwitch.cs
- DrawingGroupDrawingContext.cs
- Section.cs
- Queue.cs
- ChtmlCalendarAdapter.cs
- sqlmetadatafactory.cs
- AbstractSvcMapFileLoader.cs
- ParentUndoUnit.cs
- RequestNavigateEventArgs.cs
- Site.cs
- XmlIncludeAttribute.cs
- Model3DGroup.cs
- ColorBuilder.cs
- MethodSet.cs
- Int64KeyFrameCollection.cs
- Application.cs
- SqlMetaData.cs
- BreakRecordTable.cs
- LocatorPart.cs
- BlurBitmapEffect.cs
- TextDecorations.cs
- DropShadowEffect.cs
- DeferredReference.cs
- DrawTreeNodeEventArgs.cs
- DataListItem.cs
- ExpressionEditorAttribute.cs
- BindMarkupExtensionSerializer.cs
- OdbcDataReader.cs
- TraceContext.cs
- SynchronizationHandlesCodeDomSerializer.cs
- TreeView.cs
- UnmanagedMemoryStream.cs
- JpegBitmapEncoder.cs
- HandleScope.cs
- X509ThumbprintKeyIdentifierClause.cs
- EmptyControlCollection.cs
- SqlRemoveConstantOrderBy.cs
- TextBlock.cs
- CompilerGlobalScopeAttribute.cs
- BezierSegment.cs
- MetadataCache.cs
- TraceSource.cs
- ContentIterators.cs
- DynamicDataExtensions.cs
- ExcCanonicalXml.cs
- ManagementObjectSearcher.cs
- SchemaNotation.cs
- ButtonPopupAdapter.cs
- URL.cs
- DataGridTableStyleMappingNameEditor.cs
- ExternalCalls.cs
- ThicknessConverter.cs
- ValueExpressions.cs
- XmlSchemaComplexType.cs
- HierarchicalDataTemplate.cs
- ProofTokenCryptoHandle.cs
- DefinitionUpdate.cs
- SqlGenericUtil.cs
- DataTableMappingCollection.cs
- OletxTransactionManager.cs
- PointHitTestParameters.cs
- DictionaryEntry.cs
- UIElementAutomationPeer.cs
- FileDetails.cs
- PointValueSerializer.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- CipherData.cs
- SystemFonts.cs
- BitmapFrameDecode.cs