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
- SpeakProgressEventArgs.cs
- BackgroundFormatInfo.cs
- DictationGrammar.cs
- ResetableIterator.cs
- mda.cs
- HTMLTagNameToTypeMapper.cs
- OSFeature.cs
- SettingsSection.cs
- safelink.cs
- SiteMap.cs
- MessageDescription.cs
- MatrixStack.cs
- ExecutedRoutedEventArgs.cs
- WebPartConnectionsCancelVerb.cs
- UIPermission.cs
- XmlSignatureProperties.cs
- SiteOfOriginPart.cs
- EntryIndex.cs
- SelectionEditingBehavior.cs
- SecurityManager.cs
- cookiecontainer.cs
- BinarySerializer.cs
- Metadata.cs
- SamlAdvice.cs
- OleDbParameterCollection.cs
- RadioButton.cs
- SerializableAttribute.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- VirtualDirectoryMapping.cs
- TargetFrameworkUtil.cs
- RuleConditionDialog.cs
- DataGridViewRowStateChangedEventArgs.cs
- PeerNameRecordCollection.cs
- Property.cs
- AmbientEnvironment.cs
- RtfFormatStack.cs
- TrackingLocation.cs
- SecurityCapabilities.cs
- SamlSecurityToken.cs
- TypeNameConverter.cs
- ObjectIDGenerator.cs
- HasCopySemanticsAttribute.cs
- BigInt.cs
- BaseHashHelper.cs
- NamedPipeTransportSecurity.cs
- WindowsAuthenticationEventArgs.cs
- XmlCountingReader.cs
- ProviderCommandInfoUtils.cs
- WebPartCancelEventArgs.cs
- ClientRuntimeConfig.cs
- JumpPath.cs
- FilteredAttributeCollection.cs
- BaseHashHelper.cs
- RSAProtectedConfigurationProvider.cs
- TableProviderWrapper.cs
- _SSPIWrapper.cs
- ModelTreeEnumerator.cs
- OracleParameter.cs
- Messages.cs
- SQLInt64Storage.cs
- DataPagerFieldCommandEventArgs.cs
- RNGCryptoServiceProvider.cs
- FileVersionInfo.cs
- LifetimeServices.cs
- SingleResultAttribute.cs
- SmtpFailedRecipientsException.cs
- SocketAddress.cs
- SiteMapDataSourceView.cs
- RtType.cs
- AttachInfo.cs
- Link.cs
- PageAsyncTask.cs
- SettingsPropertyIsReadOnlyException.cs
- SQLByteStorage.cs
- ExternalCalls.cs
- NotificationContext.cs
- DocumentReference.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- RequestContext.cs
- DesignerVerb.cs
- MimeParameterWriter.cs
- FixedPageProcessor.cs
- SecurityKeyEntropyMode.cs
- ExtensionSurface.cs
- DocumentOrderComparer.cs
- ListViewGroup.cs
- TableMethodGenerator.cs
- OutOfMemoryException.cs
- CompositeFontInfo.cs
- XmlReturnWriter.cs
- KnownTypeAttribute.cs
- CanonicalFontFamilyReference.cs
- XmlILTrace.cs
- WebEvents.cs
- IdentityHolder.cs
- BitmapVisualManager.cs
- ComponentChangingEvent.cs
- NotificationContext.cs
- FieldToken.cs
- ToolStripItemCollection.cs