Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PartialToken.cs
- ComNativeDescriptor.cs
- Pair.cs
- QuerySettings.cs
- WindowInteropHelper.cs
- Char.cs
- ForeignKeyConstraint.cs
- PublisherIdentityPermission.cs
- RoutedEventValueSerializer.cs
- AddingNewEventArgs.cs
- OdbcEnvironment.cs
- CommandLibraryHelper.cs
- CustomError.cs
- TagPrefixAttribute.cs
- FragmentQueryKB.cs
- StringFreezingAttribute.cs
- CachedCompositeFamily.cs
- DateTimeUtil.cs
- MouseEventArgs.cs
- Rfc2898DeriveBytes.cs
- OperatingSystem.cs
- XmlExtensionFunction.cs
- CharStorage.cs
- Visual3D.cs
- PageContentAsyncResult.cs
- FrameworkContentElementAutomationPeer.cs
- TemplateControlParser.cs
- TransformerConfigurationWizardBase.cs
- CellParagraph.cs
- NGCUIElementCollectionSerializerAsync.cs
- ITreeGenerator.cs
- CheckBox.cs
- NavigationCommands.cs
- ComponentResourceKeyConverter.cs
- Compiler.cs
- LambdaCompiler.Statements.cs
- TraversalRequest.cs
- Pair.cs
- BookmarkScope.cs
- ClientApiGenerator.cs
- StringAnimationBase.cs
- XPathScanner.cs
- DataPagerFieldItem.cs
- Timer.cs
- Point3DCollection.cs
- WebPartVerb.cs
- DeviceSpecific.cs
- File.cs
- IMembershipProvider.cs
- DataPager.cs
- BatchParser.cs
- ThreadPoolTaskScheduler.cs
- RightsManagementEncryptionTransform.cs
- Evidence.cs
- TriggerActionCollection.cs
- AtomServiceDocumentSerializer.cs
- RangeValueProviderWrapper.cs
- ReceiveParametersContent.cs
- RowToParametersTransformer.cs
- TextEditorCopyPaste.cs
- XmlNodeChangedEventArgs.cs
- BoundColumn.cs
- CultureInfo.cs
- FixedPageProcessor.cs
- DtdParser.cs
- UserControlCodeDomTreeGenerator.cs
- HighlightOverlayGlyph.cs
- WebPartUserCapability.cs
- DataGridPagerStyle.cs
- SharedPerformanceCounter.cs
- WebWorkflowRole.cs
- X509PeerCertificateElement.cs
- DesignBindingConverter.cs
- SelectionHighlightInfo.cs
- ClientOptions.cs
- Update.cs
- coordinatorfactory.cs
- DataContractSerializerElement.cs
- FloaterParaClient.cs
- ApplicationDirectory.cs
- RuleCache.cs
- DSACryptoServiceProvider.cs
- EdmMember.cs
- HostingPreferredMapPath.cs
- CachedTypeface.cs
- GenericIdentity.cs
- GlyphsSerializer.cs
- PerfService.cs
- ModulesEntry.cs
- CommandManager.cs
- StickyNoteHelper.cs
- ControlType.cs
- MobileListItemCollection.cs
- ConnectionManagementSection.cs
- TextTreeFixupNode.cs
- XmlAggregates.cs
- XmlSchemaSet.cs
- Int32RectConverter.cs
- ScriptingSectionGroup.cs
- Column.cs