Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / NameSpaceEvent.cs / 1305376 / NameSpaceEvent.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 NamespaceEvent : Event { private string namespaceUri; private string name; public NamespaceEvent(NavigatorInput input) { Debug.Assert(input != null); Debug.Assert(input.NodeType == XPathNodeType.Namespace); this.namespaceUri = input.Value; this.name = input.LocalName; } public override void ReplaceNamespaceAlias(Compiler compiler){ if (this.namespaceUri.Length != 0) { // Do we need to check this for namespace? NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri); if (ResultURIInfo != null) { this.namespaceUri = ResultURIInfo.nameSpace; if (ResultURIInfo.prefix != null) { this.name = ResultURIInfo.prefix; } } } } public override bool Output(Processor processor, ActionFrame frame) { bool res; res = processor.BeginEvent(XPathNodeType.Namespace, /*prefix:*/null, this.name, this.namespaceUri, /*empty:*/false); Debug.Assert(res); // Namespace node as any other attribute can't fail because it doesn't signal record change res = processor.EndEvent(XPathNodeType.Namespace); Debug.Assert(res); return true; } } } // 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 NamespaceEvent : Event { private string namespaceUri; private string name; public NamespaceEvent(NavigatorInput input) { Debug.Assert(input != null); Debug.Assert(input.NodeType == XPathNodeType.Namespace); this.namespaceUri = input.Value; this.name = input.LocalName; } public override void ReplaceNamespaceAlias(Compiler compiler){ if (this.namespaceUri.Length != 0) { // Do we need to check this for namespace? NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri); if (ResultURIInfo != null) { this.namespaceUri = ResultURIInfo.nameSpace; if (ResultURIInfo.prefix != null) { this.name = ResultURIInfo.prefix; } } } } public override bool Output(Processor processor, ActionFrame frame) { bool res; res = processor.BeginEvent(XPathNodeType.Namespace, /*prefix:*/null, this.name, this.namespaceUri, /*empty:*/false); Debug.Assert(res); // Namespace node as any other attribute can't fail because it doesn't signal record change res = processor.EndEvent(XPathNodeType.Namespace); Debug.Assert(res); return true; } } } // 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
- ScriptReferenceEventArgs.cs
- SystemWebSectionGroup.cs
- ScrollPattern.cs
- SapiRecognizer.cs
- RealProxy.cs
- BamlLocalizableResource.cs
- DeclarativeExpressionConditionDeclaration.cs
- DoubleLinkList.cs
- TypeContext.cs
- Hyperlink.cs
- MissingMethodException.cs
- Application.cs
- ChannelBinding.cs
- BrowserCapabilitiesFactoryBase.cs
- SourceExpressionException.cs
- PageMediaSize.cs
- MultiPartWriter.cs
- PowerModeChangedEventArgs.cs
- __ComObject.cs
- Emitter.cs
- UrlMappingsSection.cs
- DatePickerAutomationPeer.cs
- CheckBoxPopupAdapter.cs
- ExtensionCollection.cs
- ChineseLunisolarCalendar.cs
- PolicyDesigner.cs
- BehaviorService.cs
- XmlSerializerSection.cs
- Rect3DValueSerializer.cs
- TabPage.cs
- EventlogProvider.cs
- ThreadStaticAttribute.cs
- OdbcUtils.cs
- PointCollection.cs
- KeyInfo.cs
- EventLogPermissionAttribute.cs
- SafeRegistryHandle.cs
- Memoizer.cs
- FunctionDetailsReader.cs
- MeshGeometry3D.cs
- NamespaceMapping.cs
- IncrementalCompileAnalyzer.cs
- LoginUtil.cs
- CommonEndpointBehaviorElement.cs
- ToolStripItemTextRenderEventArgs.cs
- RNGCryptoServiceProvider.cs
- MatrixAnimationUsingKeyFrames.cs
- MasterPageBuildProvider.cs
- AccessControlList.cs
- XmlStreamStore.cs
- ImageCodecInfo.cs
- OutOfProcStateClientManager.cs
- RuntimeHelpers.cs
- CFGGrammar.cs
- EventLogPermissionEntry.cs
- EncodingConverter.cs
- PeerTransportSecurityElement.cs
- PropertyDescriptorGridEntry.cs
- CrossContextChannel.cs
- cookieexception.cs
- SocketInformation.cs
- BindingValueChangedEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- SuppressIldasmAttribute.cs
- CustomErrorCollection.cs
- CollectionCodeDomSerializer.cs
- Token.cs
- MemberInfoSerializationHolder.cs
- CurrencyWrapper.cs
- DesignerActionListCollection.cs
- DynamicRenderer.cs
- SynchronizedMessageSource.cs
- Menu.cs
- RequestQueryParser.cs
- OrderedDictionary.cs
- AsyncCompletedEventArgs.cs
- WSMessageEncoding.cs
- LocalizableAttribute.cs
- cookieexception.cs
- CompositeControl.cs
- MD5.cs
- BaseHashHelper.cs
- HwndSubclass.cs
- AutoGeneratedFieldProperties.cs
- CorePropertiesFilter.cs
- Light.cs
- PolicyFactory.cs
- WebPartRestoreVerb.cs
- StaticSiteMapProvider.cs
- XamlParser.cs
- DBPropSet.cs
- OdbcPermission.cs
- ObjectPersistData.cs
- DynamicPropertyHolder.cs
- TrackingStringDictionary.cs
- PenThread.cs
- TransactionManager.cs
- ObjectQueryExecutionPlan.cs
- TreeNodeBindingCollection.cs
- XmlLanguage.cs