Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1 / 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
- HtmlObjectListAdapter.cs
- DataSourceControlBuilder.cs
- DisplayInformation.cs
- StateChangeEvent.cs
- DrawingAttributeSerializer.cs
- CharAnimationUsingKeyFrames.cs
- BinaryCommonClasses.cs
- SafeUserTokenHandle.cs
- SafeSystemMetrics.cs
- NameGenerator.cs
- WindowsAuthenticationModule.cs
- Underline.cs
- MarshalByRefObject.cs
- WebPartCloseVerb.cs
- NetCodeGroup.cs
- HelpProvider.cs
- errorpatternmatcher.cs
- DoubleLinkListEnumerator.cs
- JumpPath.cs
- CompilerParameters.cs
- XmlIncludeAttribute.cs
- CalculatedColumn.cs
- EditorAttribute.cs
- Literal.cs
- AlphaSortedEnumConverter.cs
- ApplicationServiceManager.cs
- DataGridCaption.cs
- ToolStripHighContrastRenderer.cs
- RelationshipDetailsRow.cs
- ProjectionQueryOptionExpression.cs
- TrustSection.cs
- WorkflowViewService.cs
- BuildDependencySet.cs
- NegationPusher.cs
- TypefaceMap.cs
- ResourceManager.cs
- ConstantExpression.cs
- TimeSpanValidator.cs
- PointAnimationClockResource.cs
- ParenthesizePropertyNameAttribute.cs
- PageHandlerFactory.cs
- StrokeNodeEnumerator.cs
- ListViewContainer.cs
- UnsafeNativeMethods.cs
- FileSystemInfo.cs
- UIElementParagraph.cs
- GifBitmapEncoder.cs
- CalendarTable.cs
- ByteStack.cs
- EdgeProfileValidation.cs
- QueryStringParameter.cs
- Run.cs
- ConsumerConnectionPointCollection.cs
- SafeLocalMemHandle.cs
- HttpModulesSection.cs
- Int64.cs
- RegexCompiler.cs
- CriticalHandle.cs
- CatalogPartCollection.cs
- TCEAdapterGenerator.cs
- regiisutil.cs
- Funcletizer.cs
- FormClosingEvent.cs
- DataColumnPropertyDescriptor.cs
- Stopwatch.cs
- IgnoreSection.cs
- NamedElement.cs
- ProcessRequestArgs.cs
- MultipleViewPattern.cs
- ModelTreeEnumerator.cs
- HtmlMeta.cs
- DataGrid.cs
- RightsManagementEncryptedStream.cs
- PkcsMisc.cs
- Point3DKeyFrameCollection.cs
- BoolExpressionVisitors.cs
- InternalBufferManager.cs
- ArrangedElement.cs
- RequestResponse.cs
- GenericTypeParameterBuilder.cs
- Brush.cs
- TransformCryptoHandle.cs
- StylusDownEventArgs.cs
- HwndTarget.cs
- StylusPlugin.cs
- DependencyPropertyKey.cs
- SamlDelegatingWriter.cs
- GridErrorDlg.cs
- AbstractDataSvcMapFileLoader.cs
- ImageMap.cs
- Style.cs
- ActiveDesignSurfaceEvent.cs
- ItemsPresenter.cs
- PerformanceCounterLib.cs
- DelegateCompletionCallbackWrapper.cs
- EntityDataSourceDataSelection.cs
- HwndHost.cs
- MimeMapping.cs
- SchemaNames.cs
- KeyedPriorityQueue.cs