Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1305376 / BeginEvent.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 BeginEvent : Event { private XPathNodeType nodeType; private string namespaceUri; private string name; private string prefix; private bool empty; private object htmlProps; #if DEBUG private bool replaceNSAliasesDone; #endif public BeginEvent(Compiler compiler) { NavigatorInput input = compiler.Input; Debug.Assert(input != null); Debug.Assert(input.NodeType != XPathNodeType.Namespace); this.nodeType = input.NodeType; this.namespaceUri = input.NamespaceURI; this.name = input.LocalName; this.prefix = input.Prefix; this.empty = input.IsEmptyTag; if (nodeType == XPathNodeType.Element) { this.htmlProps = HtmlElementProps.GetProps(this.name); } else if (nodeType == XPathNodeType.Attribute) { this.htmlProps = HtmlAttributeProps.GetProps(this.name); } } public override void ReplaceNamespaceAlias(Compiler compiler){ #if DEBUG Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad."); replaceNSAliasesDone = true; #endif if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) { return ; // '#default' aren't apply to attributes. } NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri); if (ResultURIInfo != null) { this.namespaceUri = ResultURIInfo.nameSpace; if (ResultURIInfo.prefix != null) { this.prefix = ResultURIInfo.prefix; } } } public override bool Output(Processor processor, ActionFrame frame) { return processor.BeginEvent(this.nodeType, this.prefix, this.name, this.namespaceUri, this.empty, this.htmlProps, false); } } } // 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 BeginEvent : Event { private XPathNodeType nodeType; private string namespaceUri; private string name; private string prefix; private bool empty; private object htmlProps; #if DEBUG private bool replaceNSAliasesDone; #endif public BeginEvent(Compiler compiler) { NavigatorInput input = compiler.Input; Debug.Assert(input != null); Debug.Assert(input.NodeType != XPathNodeType.Namespace); this.nodeType = input.NodeType; this.namespaceUri = input.NamespaceURI; this.name = input.LocalName; this.prefix = input.Prefix; this.empty = input.IsEmptyTag; if (nodeType == XPathNodeType.Element) { this.htmlProps = HtmlElementProps.GetProps(this.name); } else if (nodeType == XPathNodeType.Attribute) { this.htmlProps = HtmlAttributeProps.GetProps(this.name); } } public override void ReplaceNamespaceAlias(Compiler compiler){ #if DEBUG Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad."); replaceNSAliasesDone = true; #endif if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) { return ; // '#default' aren't apply to attributes. } NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri); if (ResultURIInfo != null) { this.namespaceUri = ResultURIInfo.nameSpace; if (ResultURIInfo.prefix != null) { this.prefix = ResultURIInfo.prefix; } } } public override bool Output(Processor processor, ActionFrame frame) { return processor.BeginEvent(this.nodeType, this.prefix, this.name, this.namespaceUri, this.empty, this.htmlProps, false); } } } // 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
- WindowsScrollBarBits.cs
- TrustManagerPromptUI.cs
- GridItemPattern.cs
- ImageConverter.cs
- CustomActivityDesigner.cs
- StreamResourceInfo.cs
- PropertyConverter.cs
- ArrayWithOffset.cs
- WebBrowser.cs
- XPathMessageFilterElement.cs
- Barrier.cs
- DbMetaDataFactory.cs
- nulltextnavigator.cs
- ComponentResourceKeyConverter.cs
- PeerNameRecord.cs
- SecurityRuntime.cs
- SubMenuStyle.cs
- InheritanceContextChangedEventManager.cs
- MapPathBasedVirtualPathProvider.cs
- altserialization.cs
- LayoutTable.cs
- ManipulationPivot.cs
- MenuItemBinding.cs
- SessionStateSection.cs
- XmlAttribute.cs
- WebServiceErrorEvent.cs
- DataGridViewColumnConverter.cs
- PolicyException.cs
- GeneralTransform.cs
- Renderer.cs
- MailWriter.cs
- IriParsingElement.cs
- DtdParser.cs
- ProcessHostServerConfig.cs
- DataObjectPastingEventArgs.cs
- DebuggerAttributes.cs
- CircleEase.cs
- ProtocolsConfiguration.cs
- JsonReader.cs
- WorkflowOperationErrorHandler.cs
- ListView.cs
- X509CertificateStore.cs
- PassportPrincipal.cs
- DataGridViewAddColumnDialog.cs
- ToolStripDesignerAvailabilityAttribute.cs
- NetTcpBindingCollectionElement.cs
- figurelengthconverter.cs
- DataControlCommands.cs
- HtmlTableRow.cs
- Point4D.cs
- BookmarkScopeHandle.cs
- ResourceContainer.cs
- LocalFileSettingsProvider.cs
- ToolStripOverflowButton.cs
- ButtonBaseAdapter.cs
- InfoCardServiceInstallComponent.cs
- TraceHandlerErrorFormatter.cs
- SharedPerformanceCounter.cs
- storepermission.cs
- EntityUtil.cs
- IntSecurity.cs
- wgx_render.cs
- SqlTriggerContext.cs
- SoapAttributes.cs
- FlowLayoutPanel.cs
- UniqueID.cs
- XmlILModule.cs
- MenuItemStyleCollection.cs
- TrackingMemoryStreamFactory.cs
- DataGridViewCellValueEventArgs.cs
- NetworkInformationException.cs
- AuthenticatingEventArgs.cs
- XmlAttributeCache.cs
- InputLanguageCollection.cs
- LinqDataSourceHelper.cs
- BaseInfoTable.cs
- RadioButtonAutomationPeer.cs
- AttachedAnnotationChangedEventArgs.cs
- MtomMessageEncodingBindingElement.cs
- ChangePassword.cs
- SystemColors.cs
- UIElementParagraph.cs
- Activity.cs
- Material.cs
- AdCreatedEventArgs.cs
- PolicyManager.cs
- StyleHelper.cs
- TraceUtils.cs
- Config.cs
- FormParameter.cs
- XMLSyntaxException.cs
- Currency.cs
- User.cs
- TextStore.cs
- Base64Encoder.cs
- activationcontext.cs
- EntityDataSourceDataSelection.cs
- FixedSOMImage.cs
- RealizedColumnsBlock.cs
- WindowsFont.cs