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
- TypeForwardedToAttribute.cs
- Hex.cs
- HttpModuleAction.cs
- GetParentChain.cs
- basevalidator.cs
- GridView.cs
- WebScriptEndpointElement.cs
- CodeDOMProvider.cs
- _LocalDataStore.cs
- DataServiceQuery.cs
- Win32.cs
- XamlDebuggerXmlReader.cs
- ImageClickEventArgs.cs
- WindowsGraphicsWrapper.cs
- PaperSource.cs
- XNodeValidator.cs
- DesignTimeDataBinding.cs
- DataControlPagerLinkButton.cs
- ObjectQuery_EntitySqlExtensions.cs
- TextSelectionHighlightLayer.cs
- PersianCalendar.cs
- TypeBuilderInstantiation.cs
- Exceptions.cs
- TextElementAutomationPeer.cs
- ListControl.cs
- ObjectListCommandEventArgs.cs
- CombinedGeometry.cs
- _SecureChannel.cs
- HttpWriter.cs
- PropertyChangingEventArgs.cs
- SqlClientWrapperSmiStreamChars.cs
- CodeAttributeArgument.cs
- EventPrivateKey.cs
- XmlSchemas.cs
- ErrorHandlerModule.cs
- Events.cs
- IconHelper.cs
- FrameworkTemplate.cs
- StructuralType.cs
- SspiWrapper.cs
- ChangePassword.cs
- ImageButton.cs
- GlyphsSerializer.cs
- KeyToListMap.cs
- RefExpr.cs
- OrderedEnumerableRowCollection.cs
- Matrix3D.cs
- SoapExtensionTypeElement.cs
- Win32.cs
- MethodResolver.cs
- CharacterBuffer.cs
- EntityDataSourceMemberPath.cs
- ListParaClient.cs
- CodeMemberProperty.cs
- HtmlImage.cs
- ComponentEvent.cs
- LocalizedNameDescriptionPair.cs
- DecoderExceptionFallback.cs
- AdapterDictionary.cs
- SqlUnionizer.cs
- HandlerElement.cs
- TransformCollection.cs
- XmlSchemaFacet.cs
- NotificationContext.cs
- TextTreeRootTextBlock.cs
- ScrollBar.cs
- InstanceKeyNotReadyException.cs
- SafeTimerHandle.cs
- Base64Decoder.cs
- SafeRegistryKey.cs
- OdbcConnection.cs
- TextViewDesigner.cs
- TextLine.cs
- DataGridAddNewRow.cs
- CollectionConverter.cs
- FileChangesMonitor.cs
- ObjectStateEntryDbDataRecord.cs
- VirtualStackFrame.cs
- TypeFieldSchema.cs
- QilLoop.cs
- SourceFileBuildProvider.cs
- DataListComponentEditor.cs
- Int64KeyFrameCollection.cs
- ExtensionQuery.cs
- AllMembershipCondition.cs
- ProcessInfo.cs
- System.Data_BID.cs
- DefaultClaimSet.cs
- WindowsToolbarAsMenu.cs
- SqlGenericUtil.cs
- ForceCopyBuildProvider.cs
- Vector3DCollection.cs
- LinqMaximalSubtreeNominator.cs
- TagNameToTypeMapper.cs
- XPathBinder.cs
- SemaphoreSlim.cs
- __Error.cs
- XmlSubtreeReader.cs
- XmlHelper.cs
- SingleAnimation.cs