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
- RoutedCommand.cs
- Int32Storage.cs
- ServiceModelConfiguration.cs
- LinqDataSourceSelectEventArgs.cs
- WebServiceParameterData.cs
- ProtocolsConfigurationEntry.cs
- CacheHelper.cs
- DeriveBytes.cs
- SecurityCapabilities.cs
- PrintDialogException.cs
- SafeNativeMethods.cs
- QuaternionAnimation.cs
- FieldToken.cs
- altserialization.cs
- DataRelationPropertyDescriptor.cs
- KeyInstance.cs
- RequestCachePolicyConverter.cs
- SoapReflectionImporter.cs
- UrlPropertyAttribute.cs
- AppendHelper.cs
- WinEventWrap.cs
- AlternateViewCollection.cs
- BindingExpression.cs
- SafeCertificateContext.cs
- GradientStop.cs
- shaperfactoryquerycachekey.cs
- WindowsTab.cs
- FrameworkName.cs
- ForceCopyBuildProvider.cs
- CancellableEnumerable.cs
- DefaultValidator.cs
- glyphs.cs
- BaseUriHelper.cs
- DeferredElementTreeState.cs
- DateTimeUtil.cs
- FrameworkElementFactoryMarkupObject.cs
- LinkedResourceCollection.cs
- SuppressIldasmAttribute.cs
- FrameworkElementFactory.cs
- MultiSelectRootGridEntry.cs
- Tile.cs
- FixedSOMElement.cs
- PropertyPathWorker.cs
- ConstantExpression.cs
- AttributeProviderAttribute.cs
- ResourceAttributes.cs
- SchemaImporter.cs
- XmlChildNodes.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- CryptoConfig.cs
- SqlInternalConnectionTds.cs
- UseLicense.cs
- HelpPage.cs
- CodeTypeDelegate.cs
- CryptoKeySecurity.cs
- StackBuilderSink.cs
- Transaction.cs
- WebPartHeaderCloseVerb.cs
- ZipIOLocalFileDataDescriptor.cs
- _DynamicWinsockMethods.cs
- AnonymousIdentificationSection.cs
- tibetanshape.cs
- DropTarget.cs
- ArrayList.cs
- DesignerGeometryHelper.cs
- SrgsDocument.cs
- WmpBitmapEncoder.cs
- BitmapEffectInput.cs
- ZoneLinkButton.cs
- DesignerAttribute.cs
- StorageAssociationTypeMapping.cs
- TextDecorationCollectionConverter.cs
- StateChangeEvent.cs
- ZipArchive.cs
- SqlException.cs
- ResourceProviderFactory.cs
- StatusCommandUI.cs
- MatrixStack.cs
- DBSqlParser.cs
- WebRequestModuleElementCollection.cs
- FileLevelControlBuilderAttribute.cs
- AsmxEndpointPickerExtension.cs
- NativeActivityContext.cs
- LogicalMethodInfo.cs
- DataTemplateSelector.cs
- UndoManager.cs
- ADMembershipProvider.cs
- CodeMethodMap.cs
- RIPEMD160Managed.cs
- ActivationServices.cs
- UpdateProgress.cs
- Socket.cs
- OdbcHandle.cs
- StylusTip.cs
- _UriTypeConverter.cs
- ParentQuery.cs
- Site.cs
- XmlQueryContext.cs
- XmlConverter.cs
- WhitespaceRuleLookup.cs