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
- ChooseAction.cs
- AlternationConverter.cs
- ConstraintConverter.cs
- ContextMarshalException.cs
- ReadWriteObjectLock.cs
- LeafCellTreeNode.cs
- HwndMouseInputProvider.cs
- GridViewItemAutomationPeer.cs
- nulltextnavigator.cs
- WmlListAdapter.cs
- BitmapDownload.cs
- StringComparer.cs
- ImageMetadata.cs
- UnicodeEncoding.cs
- RangeValuePatternIdentifiers.cs
- TargetParameterCountException.cs
- RegexMatchCollection.cs
- DataGridViewColumnConverter.cs
- SrgsText.cs
- Typeface.cs
- ProbeMatchesMessage11.cs
- TextureBrush.cs
- EntityContainerEmitter.cs
- AssociationSetMetadata.cs
- DotNetATv1WindowsLogEntrySerializer.cs
- RIPEMD160Managed.cs
- AmbientLight.cs
- ExecutionEngineException.cs
- UnknownBitmapDecoder.cs
- DelegatedStream.cs
- BooleanFacetDescriptionElement.cs
- OrderedHashRepartitionEnumerator.cs
- DataGridRowDetailsEventArgs.cs
- ComboBox.cs
- OverflowException.cs
- HttpPostServerProtocol.cs
- StylusButtonEventArgs.cs
- Dump.cs
- ByteFacetDescriptionElement.cs
- TextRange.cs
- TextTreeInsertUndoUnit.cs
- DataGridViewIntLinkedList.cs
- LinearQuaternionKeyFrame.cs
- CannotUnloadAppDomainException.cs
- QueryTaskGroupState.cs
- RC2CryptoServiceProvider.cs
- BlurBitmapEffect.cs
- DescendantOverDescendantQuery.cs
- TransformProviderWrapper.cs
- AccessorTable.cs
- KnownTypesHelper.cs
- AdRotatorDesigner.cs
- CoreSwitches.cs
- DbProviderServices.cs
- FrameworkPropertyMetadata.cs
- DesignerActionMethodItem.cs
- XmlSchemaNotation.cs
- EventlogProvider.cs
- PackWebRequest.cs
- TerminatingOperationBehavior.cs
- MembershipSection.cs
- Clipboard.cs
- ProviderCollection.cs
- SortQueryOperator.cs
- DesignerActionVerbItem.cs
- PrintingPermissionAttribute.cs
- ExternalCalls.cs
- HttpResponseHeader.cs
- AppSettingsSection.cs
- ImportContext.cs
- OdbcErrorCollection.cs
- SerializableTypeCodeDomSerializer.cs
- FixedSOMPage.cs
- ProtectedConfigurationProviderCollection.cs
- VectorCollectionConverter.cs
- coordinator.cs
- HostedElements.cs
- DocumentPageViewAutomationPeer.cs
- ProtocolsConfiguration.cs
- XamlFilter.cs
- FixedSOMTextRun.cs
- AuthenticationService.cs
- InputGestureCollection.cs
- XmlFormatExtensionPointAttribute.cs
- ButtonAutomationPeer.cs
- CellQuery.cs
- BindingExpression.cs
- SafeWaitHandle.cs
- SerialStream.cs
- AuthorizationRuleCollection.cs
- NullableLongMinMaxAggregationOperator.cs
- SelectionProcessor.cs
- StateMachineWorkflow.cs
- CompressedStack.cs
- LogManagementAsyncResult.cs
- NameNode.cs
- XmlDocumentFieldSchema.cs
- DefaultPropertyAttribute.cs
- DataGridViewSelectedColumnCollection.cs
- WebEventTraceProvider.cs