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
- ToolStrip.cs
- QuadraticBezierSegment.cs
- CultureInfo.cs
- RayMeshGeometry3DHitTestResult.cs
- TemplateKeyConverter.cs
- SecureStringHasher.cs
- PauseStoryboard.cs
- ShaderEffect.cs
- SafeLibraryHandle.cs
- SmtpFailedRecipientException.cs
- FrameworkRichTextComposition.cs
- EdmPropertyAttribute.cs
- SrgsSubset.cs
- Variant.cs
- InputLanguageProfileNotifySink.cs
- DataMemberListEditor.cs
- MethodBody.cs
- BuildProviderAppliesToAttribute.cs
- VisualBasicDesignerHelper.cs
- CompilerResults.cs
- MutexSecurity.cs
- HtmlSelect.cs
- KeyInterop.cs
- altserialization.cs
- Vector3DConverter.cs
- JournalEntryStack.cs
- ThreadPool.cs
- CodeSnippetStatement.cs
- AssociatedControlConverter.cs
- WebPartDisplayMode.cs
- Attribute.cs
- webclient.cs
- Bits.cs
- LineGeometry.cs
- PerspectiveCamera.cs
- CacheHelper.cs
- XmlCharCheckingWriter.cs
- HttpCapabilitiesEvaluator.cs
- EmptyEnumerable.cs
- TaskFormBase.cs
- XmlChildEnumerator.cs
- ChildrenQuery.cs
- FixedStringLookup.cs
- GenericsInstances.cs
- HostingEnvironmentSection.cs
- SoapInteropTypes.cs
- mediaeventargs.cs
- GeneralTransform.cs
- TimeoutException.cs
- AnnotationAuthorChangedEventArgs.cs
- ProcessHostServerConfig.cs
- ContainerParaClient.cs
- TraceSource.cs
- HtmlImage.cs
- TextEndOfParagraph.cs
- CounterCreationDataConverter.cs
- Bits.cs
- FileInfo.cs
- ConvertTextFrag.cs
- AlternationConverter.cs
- PersistenceTypeAttribute.cs
- ConfigurationException.cs
- XmlHierarchyData.cs
- JoinGraph.cs
- PeerNameRegistration.cs
- SqlUtil.cs
- HandlerBase.cs
- Int64Converter.cs
- SQLInt16Storage.cs
- Addressing.cs
- MasterPageBuildProvider.cs
- BaseValidatorDesigner.cs
- ValidatorAttribute.cs
- EpmContentDeSerializer.cs
- DataFormats.cs
- VectorKeyFrameCollection.cs
- PipeStream.cs
- ScriptHandlerFactory.cs
- GroupBoxAutomationPeer.cs
- InstancePersistenceCommandException.cs
- WebPartMenuStyle.cs
- GeneralTransform2DTo3D.cs
- ReadWriteObjectLock.cs
- NameValuePair.cs
- TableColumnCollection.cs
- TransformedBitmap.cs
- AutoResetEvent.cs
- DSACryptoServiceProvider.cs
- WebPartVerb.cs
- SurrogateSelector.cs
- HttpCapabilitiesEvaluator.cs
- ClassImporter.cs
- TimeStampChecker.cs
- ScrollProperties.cs
- JapaneseLunisolarCalendar.cs
- RequestBringIntoViewEventArgs.cs
- DesignerOptionService.cs
- PopupControlService.cs
- GorillaCodec.cs
- XmlCharCheckingWriter.cs