Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / NameSpaceEvent.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConstructorArgumentAttribute.cs
- HTMLTextWriter.cs
- AutomationElementCollection.cs
- CompilerLocalReference.cs
- TextFormatter.cs
- BlurBitmapEffect.cs
- unitconverter.cs
- FieldMetadata.cs
- DateRangeEvent.cs
- SocketAddress.cs
- DefaultPropertyAttribute.cs
- DispatchChannelSink.cs
- LabelEditEvent.cs
- CloseCryptoHandleRequest.cs
- SmtpMail.cs
- CompilationLock.cs
- SqlDataSourceCache.cs
- streamingZipPartStream.cs
- ConnectionConsumerAttribute.cs
- DataControlFieldCell.cs
- VScrollBar.cs
- AdministrationHelpers.cs
- Storyboard.cs
- IdnMapping.cs
- ArrangedElementCollection.cs
- SafeRightsManagementSessionHandle.cs
- IssuanceLicense.cs
- ReachSerializationCacheItems.cs
- IdentityHolder.cs
- SqlProviderManifest.cs
- StrongNameHelpers.cs
- TCPClient.cs
- NavigatorOutput.cs
- ContainerParagraph.cs
- SecurityElement.cs
- TabRenderer.cs
- ToolBarButtonClickEvent.cs
- StringValidatorAttribute.cs
- InputLanguageProfileNotifySink.cs
- EncodingFallbackAwareXmlTextWriter.cs
- _SafeNetHandles.cs
- ConfigurationManagerHelper.cs
- OSFeature.cs
- IndentedWriter.cs
- Collection.cs
- NameValuePair.cs
- ContainerParagraph.cs
- Line.cs
- TableStyle.cs
- FontEditor.cs
- SynchronizationContext.cs
- HttpFileCollection.cs
- FontResourceCache.cs
- SqlProvider.cs
- MetadataExchangeClient.cs
- LinqDataView.cs
- ACL.cs
- DesignerTransaction.cs
- GeneralTransform2DTo3D.cs
- PageWrapper.cs
- PageBorderless.cs
- FastPropertyAccessor.cs
- TransactionCache.cs
- PersonalizationEntry.cs
- ConnectionStringsSection.cs
- DesignTimeParseData.cs
- ParsedAttributeCollection.cs
- BindingManagerDataErrorEventArgs.cs
- ApplicationDirectory.cs
- ReadOnlyDataSourceView.cs
- XamlToRtfWriter.cs
- Rotation3D.cs
- ContentElementCollection.cs
- IntSecurity.cs
- EmbeddedMailObjectsCollection.cs
- RelatedEnd.cs
- SqlAliaser.cs
- ConditionCollection.cs
- AtomPub10ServiceDocumentFormatter.cs
- BitmapImage.cs
- XmlSchemaChoice.cs
- FrameworkTemplate.cs
- ColumnResizeUndoUnit.cs
- OneToOneMappingSerializer.cs
- HtmlGenericControl.cs
- HttpCacheVary.cs
- ExpressionStringBuilder.cs
- COM2PropertyDescriptor.cs
- PublishLicense.cs
- DataGridViewCellCollection.cs
- NativeMethods.cs
- Rect3DConverter.cs
- ContractCodeDomInfo.cs
- Boolean.cs
- XmlValidatingReader.cs
- Graphics.cs
- PropertyToken.cs
- Variant.cs
- GroupBox.cs
- GlyphTypeface.cs