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
- DataGridGeneralPage.cs
- SortQueryOperator.cs
- PathFigureCollectionValueSerializer.cs
- CustomCredentialPolicy.cs
- TabControlAutomationPeer.cs
- ErrorReporting.cs
- BoundPropertyEntry.cs
- ZipFileInfo.cs
- CustomAttributeBuilder.cs
- EncoderReplacementFallback.cs
- QilInvokeLateBound.cs
- IChannel.cs
- MsmqProcessProtocolHandler.cs
- sqlmetadatafactory.cs
- ConfigXmlCDataSection.cs
- _AutoWebProxyScriptWrapper.cs
- URLMembershipCondition.cs
- SafePointer.cs
- LinqDataSource.cs
- AttributeCollection.cs
- ActivationArguments.cs
- TraceHwndHost.cs
- ButtonFlatAdapter.cs
- PageCanvasSize.cs
- MetadataArtifactLoaderCompositeFile.cs
- BrushProxy.cs
- RegexCompiler.cs
- StringCollection.cs
- Int32AnimationUsingKeyFrames.cs
- DynamicDataResources.Designer.cs
- BufferedWebEventProvider.cs
- TypeGenericEnumerableViewSchema.cs
- DefaultHttpHandler.cs
- DirectoryInfo.cs
- dsa.cs
- DefaultValueAttribute.cs
- DynamicValidatorEventArgs.cs
- DiscoveryDocumentSerializer.cs
- OleAutBinder.cs
- PolyLineSegment.cs
- FormatConvertedBitmap.cs
- latinshape.cs
- DependencyPropertyConverter.cs
- BitmapEffectState.cs
- SQLMoneyStorage.cs
- KeyTime.cs
- ServicesUtilities.cs
- DiscardableAttribute.cs
- Ipv6Element.cs
- RestrictedTransactionalPackage.cs
- DataControlCommands.cs
- BinaryConverter.cs
- SmtpException.cs
- Mappings.cs
- ProcessModelSection.cs
- XomlCompilerHelpers.cs
- TextContainerHelper.cs
- OleDbRowUpdatingEvent.cs
- JsonReader.cs
- DependencyProperty.cs
- CodeAttachEventStatement.cs
- XXXInfos.cs
- ControlBuilderAttribute.cs
- DeferredElementTreeState.cs
- IISMapPath.cs
- cryptoapiTransform.cs
- ProcessModelSection.cs
- QuaternionKeyFrameCollection.cs
- Stroke.cs
- ControlTemplate.cs
- EdmConstants.cs
- SnapshotChangeTrackingStrategy.cs
- GZipUtils.cs
- Rules.cs
- ConfigXmlSignificantWhitespace.cs
- COSERVERINFO.cs
- TraceHandlerErrorFormatter.cs
- WaitHandleCannotBeOpenedException.cs
- ConnectionPointGlyph.cs
- QueryOutputWriter.cs
- XmlCharType.cs
- NumericUpDownAccelerationCollection.cs
- XmlChoiceIdentifierAttribute.cs
- CodeVariableReferenceExpression.cs
- CodeDOMProvider.cs
- StyleHelper.cs
- SystemFonts.cs
- WebPartAddingEventArgs.cs
- Soap12ProtocolImporter.cs
- TextEditorLists.cs
- CheckPair.cs
- MobileUserControl.cs
- HtmlForm.cs
- WebPartVerbsEventArgs.cs
- WizardForm.cs
- IdleTimeoutMonitor.cs
- UserControlFileEditor.cs
- SecurityUtils.cs
- HttpCapabilitiesSectionHandler.cs
- Pen.cs