Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / NameSpaceEvent.cs / 1 / 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
- BehaviorService.cs
- ProxyWebPartConnectionCollection.cs
- DataService.cs
- WorkflowApplicationCompletedEventArgs.cs
- _NetRes.cs
- ProcessModuleCollection.cs
- Authorization.cs
- WeakRefEnumerator.cs
- ControlValuePropertyAttribute.cs
- FileUtil.cs
- GeneralTransform3D.cs
- TextEndOfSegment.cs
- OuterGlowBitmapEffect.cs
- Form.cs
- ApplySecurityAndSendAsyncResult.cs
- PanningMessageFilter.cs
- XmlUrlResolver.cs
- QueryCursorEventArgs.cs
- InvalidDataException.cs
- ReadOnlyTernaryTree.cs
- Vector3DCollection.cs
- RootProfilePropertySettingsCollection.cs
- TemplatePartAttribute.cs
- TextTreeFixupNode.cs
- CharKeyFrameCollection.cs
- OracleLob.cs
- DisposableCollectionWrapper.cs
- CompressStream.cs
- ActivityMarkupSerializer.cs
- TextElementAutomationPeer.cs
- MappingItemCollection.cs
- List.cs
- BlockExpression.cs
- CodeStatement.cs
- ExtensionQuery.cs
- TraceData.cs
- COM2TypeInfoProcessor.cs
- Listen.cs
- CollectionChange.cs
- WebPartCloseVerb.cs
- PropertyTabAttribute.cs
- RefreshEventArgs.cs
- ObjectStateEntryDbDataRecord.cs
- EntitySetBaseCollection.cs
- Point4D.cs
- ExpressionHelper.cs
- TextEditorThreadLocalStore.cs
- EncodingDataItem.cs
- TypeUsage.cs
- ColorComboBox.cs
- WebServiceMethodData.cs
- ImageCodecInfo.cs
- TextBox.cs
- EventRoute.cs
- CacheMode.cs
- AlternateView.cs
- SafeMILHandle.cs
- _CacheStreams.cs
- XamlTemplateSerializer.cs
- wmiutil.cs
- CompiledQueryCacheEntry.cs
- MarkupExtensionParser.cs
- MediaElement.cs
- Literal.cs
- PropertyMapper.cs
- CryptoApi.cs
- EventManager.cs
- FullTextState.cs
- GridViewDeleteEventArgs.cs
- Drawing.cs
- NumericUpDownAcceleration.cs
- ReadWriteSpinLock.cs
- ButtonFieldBase.cs
- BindingManagerDataErrorEventArgs.cs
- Int16KeyFrameCollection.cs
- CroppedBitmap.cs
- XmlSchemaProviderAttribute.cs
- InstancePersistenceEvent.cs
- ExpressionQuoter.cs
- SymLanguageVendor.cs
- UniqueEventHelper.cs
- DummyDataSource.cs
- EnumerableRowCollection.cs
- DataSourceSelectArguments.cs
- SiteMapNodeCollection.cs
- FileSystemInfo.cs
- SwitchCase.cs
- TextEncodedRawTextWriter.cs
- PerformanceCounterManager.cs
- Condition.cs
- SetUserPreferenceRequest.cs
- FontStyles.cs
- CaretElement.cs
- Drawing.cs
- BitmapImage.cs
- CompressStream.cs
- SafeEventLogWriteHandle.cs
- Bidi.cs
- NTAccount.cs
- Application.cs