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
- XPathAncestorQuery.cs
- CachedPathData.cs
- RSAPKCS1SignatureDeformatter.cs
- MessageVersion.cs
- RegexNode.cs
- AspNetCompatibilityRequirementsMode.cs
- EntityViewContainer.cs
- TCPListener.cs
- EmissiveMaterial.cs
- ObjectReferenceStack.cs
- Soap.cs
- ChannelDispatcher.cs
- PropertyToken.cs
- UriPrefixTable.cs
- MaterializeFromAtom.cs
- ListBox.cs
- parserscommon.cs
- ByteBufferPool.cs
- ContentTextAutomationPeer.cs
- ContractNamespaceAttribute.cs
- TypeDependencyAttribute.cs
- complextypematerializer.cs
- Win32Native.cs
- TextRunCacheImp.cs
- ToolStripPanelSelectionBehavior.cs
- StreamResourceInfo.cs
- ListBoxItem.cs
- CmsInterop.cs
- ExtensionElement.cs
- DataGridViewRow.cs
- LeftCellWrapper.cs
- DataTrigger.cs
- MimeTypePropertyAttribute.cs
- HostingEnvironmentSection.cs
- ProfilePropertySettings.cs
- AppDomainProtocolHandler.cs
- BamlRecordWriter.cs
- ToolStripItemImageRenderEventArgs.cs
- FontStretchConverter.cs
- TextTreeRootNode.cs
- WebPartZone.cs
- CqlBlock.cs
- Activator.cs
- InvalidateEvent.cs
- ParseChildrenAsPropertiesAttribute.cs
- ConfigXmlAttribute.cs
- SafeHandles.cs
- WebHttpSecurityElement.cs
- _ContextAwareResult.cs
- FixedTextContainer.cs
- ListenerPerfCounters.cs
- ServiceActivationException.cs
- WebBrowserEvent.cs
- PropertyTabAttribute.cs
- EventSourceCreationData.cs
- MergeLocalizationDirectives.cs
- CodeDomConfigurationHandler.cs
- datacache.cs
- CheckBoxPopupAdapter.cs
- BackoffTimeoutHelper.cs
- Vector.cs
- SizeAnimationUsingKeyFrames.cs
- Pens.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- CodeMemberProperty.cs
- HtmlHead.cs
- CallTemplateAction.cs
- TextTreeTextBlock.cs
- TextBoxAutomationPeer.cs
- SqlRetyper.cs
- ReadOnlyDictionary.cs
- DesignTimeType.cs
- KnownBoxes.cs
- IndexedGlyphRun.cs
- ToolboxComponentsCreatedEventArgs.cs
- BasicExpandProvider.cs
- RefType.cs
- MSHTMLHost.cs
- ServicePointManagerElement.cs
- ZipIOBlockManager.cs
- ComponentEditorPage.cs
- BorderGapMaskConverter.cs
- StackOverflowException.cs
- EventRoute.cs
- RealProxy.cs
- ReadOnlyPermissionSet.cs
- ListControl.cs
- ModelTreeEnumerator.cs
- TextTabProperties.cs
- LocalizableResourceBuilder.cs
- ChtmlTextWriter.cs
- RegionIterator.cs
- MailAddress.cs
- ManagementOperationWatcher.cs
- WindowsSidIdentity.cs
- ColorIndependentAnimationStorage.cs
- EmptyReadOnlyDictionaryInternal.cs
- Crypto.cs
- HelpExampleGenerator.cs
- _SSPISessionCache.cs