Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataGridColumn.cs
- BaseTemplateBuildProvider.cs
- ProviderConnectionPoint.cs
- EventProxy.cs
- EnumerableRowCollectionExtensions.cs
- SchemaObjectWriter.cs
- Exceptions.cs
- FixedSOMFixedBlock.cs
- WebPartUtil.cs
- SpeechEvent.cs
- ByteAnimationBase.cs
- EventLogTraceListener.cs
- CachedPathData.cs
- WebPartAuthorizationEventArgs.cs
- EllipseGeometry.cs
- SecurityTokenParametersEnumerable.cs
- ConvertersCollection.cs
- RegexBoyerMoore.cs
- WebPartTransformer.cs
- PasswordPropertyTextAttribute.cs
- GroupDescription.cs
- ConsumerConnectionPointCollection.cs
- Matrix3DConverter.cs
- XmlText.cs
- RegexRunnerFactory.cs
- SequentialWorkflowHeaderFooter.cs
- ImpersonationContext.cs
- OracleFactory.cs
- XPathNavigator.cs
- OleDragDropHandler.cs
- ToggleProviderWrapper.cs
- ApplicationInfo.cs
- PublisherMembershipCondition.cs
- VersionedStream.cs
- Rect.cs
- QueryActivatableWorkflowsCommand.cs
- AutomationTextAttribute.cs
- DisposableCollectionWrapper.cs
- CommandExpr.cs
- TextRange.cs
- InternalBufferOverflowException.cs
- ContourSegment.cs
- TypeSchema.cs
- StringCollection.cs
- Converter.cs
- IgnoreFlushAndCloseStream.cs
- SspiWrapper.cs
- WindowsGrip.cs
- MultiTrigger.cs
- ButtonAutomationPeer.cs
- DataConnectionHelper.cs
- RegexReplacement.cs
- ConfigViewGenerator.cs
- BitmapEffectGroup.cs
- ServicesUtilities.cs
- HopperCache.cs
- Bits.cs
- EncryptedPackage.cs
- Delegate.cs
- Int32Storage.cs
- ViewStateModeByIdAttribute.cs
- DefaultEventAttribute.cs
- BoundsDrawingContextWalker.cs
- SaveFileDialogDesigner.cs
- IgnorePropertiesAttribute.cs
- OperationPickerDialog.cs
- FamilyTypefaceCollection.cs
- CancelEventArgs.cs
- MetafileHeaderWmf.cs
- SqlUserDefinedAggregateAttribute.cs
- ZipPackagePart.cs
- LayeredChannelFactory.cs
- InkCanvasFeedbackAdorner.cs
- RegexTree.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- Rfc2898DeriveBytes.cs
- NameValueSectionHandler.cs
- SqlConnectionFactory.cs
- ByteStreamMessageEncoder.cs
- AttributeCollection.cs
- WorkflowMessageEventArgs.cs
- DataGridViewCellFormattingEventArgs.cs
- SQLDoubleStorage.cs
- _DigestClient.cs
- EntityTransaction.cs
- SqlRowUpdatedEvent.cs
- PeerNameRegistration.cs
- WizardSideBarListControlItemEventArgs.cs
- TemplatedWizardStep.cs
- InputScopeAttribute.cs
- CodeTypeReferenceExpression.cs
- ToolStripItemGlyph.cs
- RadioButtonList.cs
- HGlobalSafeHandle.cs
- Converter.cs
- AttachedPropertyMethodSelector.cs
- AsnEncodedData.cs
- FixedTextSelectionProcessor.cs
- SoapExtensionStream.cs
- XmlNodeList.cs