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
- BaseCollection.cs
- ScaleTransform.cs
- SEHException.cs
- Viewport2DVisual3D.cs
- _NTAuthentication.cs
- Property.cs
- ErrorReporting.cs
- SHA512Managed.cs
- RowBinding.cs
- ExpressionVisitor.cs
- WindowsSecurityTokenAuthenticator.cs
- WebBrowserUriTypeConverter.cs
- CustomTrackingRecord.cs
- XmlSchemaAttribute.cs
- URIFormatException.cs
- BitmapEffectInput.cs
- TextTrailingWordEllipsis.cs
- InvalidEnumArgumentException.cs
- ProfileWorkflowElement.cs
- JsonStringDataContract.cs
- ConfigurationException.cs
- TargetPerspective.cs
- ImageFormatConverter.cs
- DataGridViewAutoSizeModeEventArgs.cs
- TransformerTypeCollection.cs
- EnumMemberAttribute.cs
- FloatMinMaxAggregationOperator.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- SharedConnectionWorkflowTransactionService.cs
- ItemList.cs
- ControlEvent.cs
- GZipStream.cs
- ArrayElementGridEntry.cs
- IgnoreFileBuildProvider.cs
- SchemaEntity.cs
- StatusBar.cs
- BrowserCapabilitiesFactory.cs
- FileSecurity.cs
- SqlUserDefinedTypeAttribute.cs
- ProxyWebPartManager.cs
- ExtendedProtectionPolicy.cs
- HttpEncoder.cs
- SpecialTypeDataContract.cs
- WpfXamlMember.cs
- ProfessionalColorTable.cs
- RotateTransform.cs
- SafeMILHandle.cs
- DataGridSortingEventArgs.cs
- SchemaEntity.cs
- MouseGesture.cs
- BitmapMetadataBlob.cs
- BrowserDefinitionCollection.cs
- XmlILAnnotation.cs
- CalendarDesigner.cs
- ObjectDisposedException.cs
- XpsColorContext.cs
- TextEvent.cs
- DataGridViewCellConverter.cs
- XhtmlTextWriter.cs
- CodeSnippetExpression.cs
- ActivityPreviewDesigner.cs
- WebUtility.cs
- DataGridAddNewRow.cs
- ExtendedTransformFactory.cs
- SourceChangedEventArgs.cs
- _BaseOverlappedAsyncResult.cs
- SafeFreeMibTable.cs
- GraphicsPath.cs
- SemanticAnalyzer.cs
- StateMachineSubscription.cs
- SafeCertificateContext.cs
- IIS7UserPrincipal.cs
- HttpConfigurationContext.cs
- UdpReplyToBehavior.cs
- SynchronizingStream.cs
- MenuItem.cs
- OLEDB_Enum.cs
- ServiceDebugBehavior.cs
- CompoundFileIOPermission.cs
- PerspectiveCamera.cs
- RegistrationServices.cs
- SqlBuffer.cs
- WindowsGraphics.cs
- EncoderParameters.cs
- XPathMessageFilterElementCollection.cs
- AuthenticationModulesSection.cs
- FontUnit.cs
- ServiceHostingEnvironmentSection.cs
- OpCellTreeNode.cs
- MediaPlayerState.cs
- CommandBinding.cs
- ControlUtil.cs
- ToolStripItemDesigner.cs
- Polyline.cs
- ArraySubsetEnumerator.cs
- ValueChangedEventManager.cs
- QuaternionRotation3D.cs
- SelectedPathEditor.cs
- GridViewUpdateEventArgs.cs
- Expressions.cs