Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Int16AnimationUsingKeyFrames.cs
- CompiledRegexRunnerFactory.cs
- ReverseComparer.cs
- XamlUtilities.cs
- ProcessModule.cs
- HeaderLabel.cs
- StorageMappingItemLoader.cs
- LinqDataSourceHelper.cs
- GeometryGroup.cs
- GradientBrush.cs
- SqlStatistics.cs
- Control.cs
- DateTimeFormat.cs
- CmsInterop.cs
- GradientSpreadMethodValidation.cs
- SQLChars.cs
- ICspAsymmetricAlgorithm.cs
- NameSpaceExtractor.cs
- JournalNavigationScope.cs
- DirectoryLocalQuery.cs
- Accessible.cs
- QuaternionRotation3D.cs
- AppDomain.cs
- CaseCqlBlock.cs
- TextEditorDragDrop.cs
- SecurityElementBase.cs
- CounterSet.cs
- UnicastIPAddressInformationCollection.cs
- Choices.cs
- DrawingAttributeSerializer.cs
- EFDataModelProvider.cs
- OperatorExpressions.cs
- TabItem.cs
- DelayDesigner.cs
- BrowserCapabilitiesCompiler.cs
- GroupLabel.cs
- CapabilitiesState.cs
- Transform3DCollection.cs
- WebWorkflowRole.cs
- NameSpaceExtractor.cs
- ExceptionHelpers.cs
- NullExtension.cs
- EntityModelSchemaGenerator.cs
- ListItemConverter.cs
- VisualStyleElement.cs
- ItemChangedEventArgs.cs
- AssertValidation.cs
- MenuItemStyle.cs
- InkCanvasInnerCanvas.cs
- PerformanceCounterPermissionEntry.cs
- EntityDataSourceDesigner.cs
- NTAccount.cs
- LoginDesigner.cs
- Encoder.cs
- EpmAttributeNameBuilder.cs
- ParameterCollection.cs
- SystemThemeKey.cs
- HwndAppCommandInputProvider.cs
- QuerySafeNavigator.cs
- CodeCommentStatement.cs
- ServiceModelSecurityTokenTypes.cs
- SimpleLine.cs
- UnSafeCharBuffer.cs
- configsystem.cs
- DataControlPagerLinkButton.cs
- WebPartDisplayModeEventArgs.cs
- Typeface.cs
- TextAdaptor.cs
- CodeExporter.cs
- DBCommandBuilder.cs
- ITextView.cs
- ResolveCriteria.cs
- AdRotator.cs
- WebBrowserUriTypeConverter.cs
- InputBindingCollection.cs
- Drawing.cs
- UnsafeNativeMethodsMilCoreApi.cs
- FtpCachePolicyElement.cs
- BaseTypeViewSchema.cs
- InputEventArgs.cs
- NamespaceQuery.cs
- VariableModifiersHelper.cs
- NavigationHelper.cs
- BridgeDataRecord.cs
- TextBoxBase.cs
- ConnectionStringSettings.cs
- ItemsControlAutomationPeer.cs
- ListViewItemSelectionChangedEvent.cs
- FontCollection.cs
- WpfSharedBamlSchemaContext.cs
- CheckPair.cs
- ModuleBuilderData.cs
- RowToParametersTransformer.cs
- InputMethod.cs
- safemediahandle.cs
- DataBoundControlAdapter.cs
- XsdBuilder.cs
- PointHitTestResult.cs
- FormsAuthenticationUserCollection.cs
- XmlEncodedRawTextWriter.cs