Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- OracleRowUpdatedEventArgs.cs
- Binding.cs
- DefaultProxySection.cs
- DurableMessageDispatchInspector.cs
- ResolveInfo.cs
- UdpDuplexChannel.cs
- ServiceNameCollection.cs
- WebPartRestoreVerb.cs
- StrongNameIdentityPermission.cs
- ObjectDataSourceSelectingEventArgs.cs
- CodeArrayIndexerExpression.cs
- DynamicDiscoveryDocument.cs
- ElementsClipboardData.cs
- PrePrepareMethodAttribute.cs
- PropertySet.cs
- ProtocolsSection.cs
- PasswordTextContainer.cs
- NameValueSectionHandler.cs
- TextPointer.cs
- FormatConvertedBitmap.cs
- Bits.cs
- UriSectionData.cs
- OptimizedTemplateContent.cs
- HostingEnvironmentException.cs
- Overlapped.cs
- IncrementalCompileAnalyzer.cs
- XhtmlBasicLinkAdapter.cs
- AspNetHostingPermission.cs
- UnsafeNativeMethods.cs
- Internal.cs
- FrameworkName.cs
- BamlResourceContent.cs
- KeyInterop.cs
- TreeChangeInfo.cs
- KernelTypeValidation.cs
- SpecularMaterial.cs
- PaintEvent.cs
- CollectionsUtil.cs
- Point4D.cs
- XNameTypeConverter.cs
- DataGridViewComboBoxCell.cs
- InputBinding.cs
- TableAutomationPeer.cs
- TreePrinter.cs
- CodeBlockBuilder.cs
- SelfIssuedAuthAsymmetricKey.cs
- WindowsTab.cs
- RoleGroup.cs
- SoapIncludeAttribute.cs
- PatternMatcher.cs
- ColumnClickEvent.cs
- ArrayWithOffset.cs
- SessionSwitchEventArgs.cs
- Timer.cs
- RectangleConverter.cs
- PngBitmapEncoder.cs
- ValueExpressions.cs
- ScriptReferenceBase.cs
- StylusButtonEventArgs.cs
- OutputCacheProfileCollection.cs
- DeviceFilterDictionary.cs
- XPathMultyIterator.cs
- FileNotFoundException.cs
- MemberProjectionIndex.cs
- GAC.cs
- ComponentDispatcher.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- FilterElement.cs
- BaseTemplateParser.cs
- RoleManagerModule.cs
- TdsRecordBufferSetter.cs
- DataSourceProvider.cs
- RSAOAEPKeyExchangeDeformatter.cs
- RunInstallerAttribute.cs
- ExtenderProviderService.cs
- WeakRefEnumerator.cs
- CurrencyWrapper.cs
- _SSPISessionCache.cs
- UrlMappingCollection.cs
- Object.cs
- SuspendDesigner.cs
- FormatConvertedBitmap.cs
- CodeGroup.cs
- GridViewCommandEventArgs.cs
- ToolBarButtonDesigner.cs
- MultitargetingHelpers.cs
- WorkflowLayouts.cs
- BoolLiteral.cs
- XmlILModule.cs
- Content.cs
- XmlCharCheckingWriter.cs
- OdbcConnectionPoolProviderInfo.cs
- DataContractSet.cs
- ToolStripDropDownItem.cs
- RegexTree.cs
- Int64Storage.cs
- FormatPage.cs
- EmbeddedMailObject.cs
- Math.cs
- TemplateControl.cs