Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- ZoomPercentageConverter.cs
- EntityDataSourceWrapper.cs
- ProvidersHelper.cs
- CharConverter.cs
- GACMembershipCondition.cs
- CachedPathData.cs
- UpdateTracker.cs
- ByteStorage.cs
- SignedInfo.cs
- DocumentsTrace.cs
- BlurEffect.cs
- TrackingServices.cs
- WebPartCatalogAddVerb.cs
- OdbcConnectionString.cs
- TraceSection.cs
- WebPartVerbCollection.cs
- XmlSchemaSimpleTypeRestriction.cs
- InheritanceContextChangedEventManager.cs
- StylusDownEventArgs.cs
- ElapsedEventArgs.cs
- ExceptionValidationRule.cs
- ServiceEndpointElementCollection.cs
- DesignerSerializationVisibilityAttribute.cs
- FixedSOMPageElement.cs
- BufferManager.cs
- PartManifestEntry.cs
- TabControl.cs
- ObjectStateEntryDbDataRecord.cs
- RectKeyFrameCollection.cs
- GiveFeedbackEvent.cs
- GeometryHitTestParameters.cs
- Win32Native.cs
- SoapFormatter.cs
- ToolStripLabel.cs
- MessageSmuggler.cs
- XslVisitor.cs
- AttributeEmitter.cs
- ClientOptions.cs
- BitmapEffect.cs
- AmbientLight.cs
- RadioButton.cs
- FixedPageStructure.cs
- CodeNamespaceCollection.cs
- CommentEmitter.cs
- Pkcs9Attribute.cs
- Int32AnimationBase.cs
- VisualStyleInformation.cs
- Visual3DCollection.cs
- Parameter.cs
- Parser.cs
- TabPanel.cs
- Baml2006ReaderSettings.cs
- MultiPageTextView.cs
- EventMappingSettingsCollection.cs
- CfgRule.cs
- DrawingImage.cs
- ErrorStyle.cs
- DbProviderFactoriesConfigurationHandler.cs
- AQNBuilder.cs
- StylusCollection.cs
- XmlSchemaCompilationSettings.cs
- NameValuePermission.cs
- ResetableIterator.cs
- MetaChildrenColumn.cs
- HtmlWindow.cs
- SchemaTypeEmitter.cs
- ScrollContentPresenter.cs
- DataKeyCollection.cs
- IntPtr.cs
- OleDbInfoMessageEvent.cs
- TrustLevel.cs
- Viewport3DAutomationPeer.cs
- RegexMatch.cs
- FragmentQueryProcessor.cs
- DrawingBrush.cs
- WebReferenceCollection.cs
- ProtocolsConfigurationEntry.cs
- XmlMapping.cs
- InvalidateEvent.cs
- UserPersonalizationStateInfo.cs
- Int32Collection.cs
- AesManaged.cs
- MetadataException.cs
- ListViewGroup.cs
- SerializationInfo.cs
- SafeRightsManagementHandle.cs
- ComContractElementCollection.cs
- TypeBuilder.cs
- ActivityTypeCodeDomSerializer.cs
- MenuBase.cs
- ParsedAttributeCollection.cs
- ButtonChrome.cs
- CodeStatementCollection.cs
- EntityKey.cs
- SoapSchemaMember.cs
- EventProviderWriter.cs
- EntityDataSourceWrapperCollection.cs
- ToolBar.cs
- TypeReference.cs
- AlphaSortedEnumConverter.cs