Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1 / 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
- DropShadowEffect.cs
- SmiEventSink.cs
- SimpleApplicationHost.cs
- Script.cs
- ComponentCache.cs
- HttpListenerRequest.cs
- DataGridViewComboBoxEditingControl.cs
- WebControlsSection.cs
- WebPartZoneAutoFormat.cs
- MULTI_QI.cs
- GiveFeedbackEvent.cs
- DbConnectionClosed.cs
- BinaryFormatterWriter.cs
- EventSource.cs
- SafeRightsManagementQueryHandle.cs
- JournalEntry.cs
- _Semaphore.cs
- AsymmetricKeyExchangeFormatter.cs
- SimpleLine.cs
- CodeAssignStatement.cs
- IOThreadTimer.cs
- TextEditorSelection.cs
- ContextMenu.cs
- ListManagerBindingsCollection.cs
- MultiSelector.cs
- FilterEventArgs.cs
- DbMetaDataFactory.cs
- GenericParameterDataContract.cs
- UnknownWrapper.cs
- XmlDataSourceNodeDescriptor.cs
- Control.cs
- MessageBox.cs
- RequestStatusBarUpdateEventArgs.cs
- ClientSponsor.cs
- DataGridTablesFactory.cs
- RegisteredHiddenField.cs
- CodeTypeOfExpression.cs
- XmlSignatureProperties.cs
- Utils.cs
- DependencyPropertyHelper.cs
- AnimationLayer.cs
- DoubleConverter.cs
- IsolatedStoragePermission.cs
- EventListenerClientSide.cs
- TrackBarDesigner.cs
- NavigationHelper.cs
- CounterCreationDataConverter.cs
- PageParserFilter.cs
- PersonalizationAdministration.cs
- DateTimeEditor.cs
- XmlSchemaSimpleTypeRestriction.cs
- MessageVersionConverter.cs
- TransactionState.cs
- DataError.cs
- PropertyChangeTracker.cs
- DesignerRegionMouseEventArgs.cs
- InputLanguageManager.cs
- OutputCacheSettingsSection.cs
- DocumentOrderQuery.cs
- FixedFindEngine.cs
- Collection.cs
- CultureInfoConverter.cs
- ThemeConfigurationDialog.cs
- RequestContext.cs
- ObjectStorage.cs
- Transform3D.cs
- ForeignKeyConstraint.cs
- ProgressBarAutomationPeer.cs
- Membership.cs
- SecurityTokenProvider.cs
- XmlLoader.cs
- FocusManager.cs
- DateTimeOffsetConverter.cs
- ReadOnlyHierarchicalDataSource.cs
- Symbol.cs
- PriorityQueue.cs
- EntityWithChangeTrackerStrategy.cs
- Label.cs
- BufferManager.cs
- CheckPair.cs
- MainMenu.cs
- EntityContainer.cs
- XmlUtil.cs
- WebPartEditorApplyVerb.cs
- ScriptingProfileServiceSection.cs
- ListChangedEventArgs.cs
- DisplayToken.cs
- DataTableCollection.cs
- Environment.cs
- Converter.cs
- FormattedText.cs
- _SingleItemRequestCache.cs
- NativeMethods.cs
- UserControlFileEditor.cs
- LambdaCompiler.Generated.cs
- recordstatefactory.cs
- PackWebResponse.cs
- StubHelpers.cs
- WindowsFormsEditorServiceHelper.cs
- InputScopeManager.cs