Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DesignerCategoryAttribute.cs
- BufferModesCollection.cs
- CssStyleCollection.cs
- GridSplitter.cs
- MbpInfo.cs
- Lasso.cs
- PassportAuthenticationEventArgs.cs
- MetadataArtifactLoaderCompositeResource.cs
- DateTimeParse.cs
- cookiecontainer.cs
- UnaryQueryOperator.cs
- UICuesEvent.cs
- SafeViewOfFileHandle.cs
- PeerEndPoint.cs
- AutomationProperties.cs
- Transform3DCollection.cs
- SafeFileHandle.cs
- SecurityElement.cs
- EventSetter.cs
- CursorEditor.cs
- BitmapFrame.cs
- ReliabilityContractAttribute.cs
- WebRequestModulesSection.cs
- DataGridViewLinkColumn.cs
- DateBoldEvent.cs
- XPathNodeInfoAtom.cs
- DES.cs
- FilterQueryOptionExpression.cs
- DataGridLength.cs
- Win32KeyboardDevice.cs
- BufferedWebEventProvider.cs
- FormatConvertedBitmap.cs
- TabControl.cs
- PolicyException.cs
- RefreshEventArgs.cs
- DataMisalignedException.cs
- UidManager.cs
- KeyGestureValueSerializer.cs
- wgx_commands.cs
- QueryCacheEntry.cs
- PropertyReferenceExtension.cs
- WorkerProcess.cs
- Utility.cs
- Attachment.cs
- SQLByteStorage.cs
- PersonalizationState.cs
- CollectionType.cs
- Point3D.cs
- SpeechUI.cs
- CacheChildrenQuery.cs
- transactioncontext.cs
- Message.cs
- StringCollection.cs
- dataprotectionpermission.cs
- PostBackOptions.cs
- DataTable.cs
- FormatConvertedBitmap.cs
- DataViewListener.cs
- ToolboxItemAttribute.cs
- StringAnimationBase.cs
- ReceiveActivityDesignerTheme.cs
- ParameterBinding.cs
- FilterUserControlBase.cs
- ToolBarPanel.cs
- HttpHandlerAction.cs
- oledbmetadatacolumnnames.cs
- DataGridTextBox.cs
- Membership.cs
- Walker.cs
- StringAnimationUsingKeyFrames.cs
- SqlRowUpdatedEvent.cs
- MaskedTextProvider.cs
- DocumentViewerBase.cs
- IDispatchConstantAttribute.cs
- WindowsGrip.cs
- AdapterDictionary.cs
- TableLayoutPanel.cs
- DetailsViewInsertEventArgs.cs
- GlobalEventManager.cs
- PrintPreviewDialog.cs
- ToolStripPanel.cs
- MetadataCacheItem.cs
- DispatcherSynchronizationContext.cs
- AttributeUsageAttribute.cs
- SQLSingle.cs
- LoadRetryConstantStrategy.cs
- TextContainerChangeEventArgs.cs
- Event.cs
- XmlQualifiedNameTest.cs
- PropertyPathWorker.cs
- UpdatePanelControlTrigger.cs
- SHA512Managed.cs
- CodeAttributeDeclaration.cs
- OperationContextScope.cs
- UserThread.cs
- XmlSchemaFacet.cs
- DependencyPropertyAttribute.cs
- Selector.cs
- ApplicationFileCodeDomTreeGenerator.cs
- Path.cs