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
- PropertyReference.cs
- CodeValidator.cs
- SequentialActivityDesigner.cs
- Splitter.cs
- MaskedTextBox.cs
- UniqueIdentifierService.cs
- ActivityStateRecord.cs
- ToolStripSeparator.cs
- ResourceAssociationTypeEnd.cs
- _SpnDictionary.cs
- LinqDataSource.cs
- DataPager.cs
- WinCategoryAttribute.cs
- OleDbCommand.cs
- ServiceHostingEnvironment.cs
- MetadataPropertyAttribute.cs
- Resources.Designer.cs
- BasicKeyConstraint.cs
- ItemDragEvent.cs
- DataGridPagerStyle.cs
- ControlAdapter.cs
- GridViewHeaderRowPresenter.cs
- EpmContentSerializer.cs
- PropertyDescriptor.cs
- DataGridViewCellValidatingEventArgs.cs
- NumberFormatInfo.cs
- ParameterBuilder.cs
- FieldNameLookup.cs
- NameTable.cs
- SrgsElementFactoryCompiler.cs
- UnsafeNativeMethods.cs
- TextPointerBase.cs
- ContainerFilterService.cs
- CodeMemberMethod.cs
- TransformConverter.cs
- ThreadInterruptedException.cs
- Path.cs
- Line.cs
- Base64Encoding.cs
- ObjectSet.cs
- DataKeyArray.cs
- RichListBox.cs
- UserControl.cs
- QilValidationVisitor.cs
- ServiceNotStartedException.cs
- DescendentsWalkerBase.cs
- RelatedImageListAttribute.cs
- XmlWellformedWriter.cs
- JsonWriter.cs
- FunctionOverloadResolver.cs
- ForEachAction.cs
- DataObject.cs
- BindableAttribute.cs
- SerializationHelper.cs
- SQLDoubleStorage.cs
- SolidColorBrush.cs
- DataBinder.cs
- ProjectionRewriter.cs
- ManagementBaseObject.cs
- AlternateView.cs
- CodeNamespaceCollection.cs
- TableLayoutRowStyleCollection.cs
- isolationinterop.cs
- WizardPanel.cs
- SiteOfOriginPart.cs
- Span.cs
- TrustSection.cs
- DtrList.cs
- MethodInfo.cs
- DocumentPaginator.cs
- SecurityContext.cs
- PropertyDescriptorGridEntry.cs
- HttpListener.cs
- DataGridGeneralPage.cs
- DataStreamFromComStream.cs
- SafeEventLogReadHandle.cs
- LinqDataSourceUpdateEventArgs.cs
- RegexBoyerMoore.cs
- PathSegment.cs
- WindowsSlider.cs
- RequiredFieldValidator.cs
- DataControlButton.cs
- CacheVirtualItemsEvent.cs
- LogPolicy.cs
- RegisteredScript.cs
- MultiSelector.cs
- DataGridColumn.cs
- KeyProperty.cs
- UIElementParaClient.cs
- JsonClassDataContract.cs
- ImageAutomationPeer.cs
- EndEvent.cs
- RayHitTestParameters.cs
- TreeNodeStyle.cs
- Rules.cs
- TypedServiceChannelBuilder.cs
- Vector3DCollectionConverter.cs
- DatePicker.cs
- HealthMonitoringSection.cs
- PropertyBuilder.cs