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
- List.cs
- RuntimeCompatibilityAttribute.cs
- UnauthorizedWebPart.cs
- Visual3D.cs
- EventArgs.cs
- SharedPersonalizationStateInfo.cs
- CodeAttachEventStatement.cs
- PreviewKeyDownEventArgs.cs
- ActivationService.cs
- SafeHandles.cs
- DefaultValueConverter.cs
- Geometry3D.cs
- SqlErrorCollection.cs
- CharStorage.cs
- DbProviderFactory.cs
- BindingOperations.cs
- XDeferredAxisSource.cs
- RenderOptions.cs
- Interlocked.cs
- SqlUdtInfo.cs
- Rectangle.cs
- ColorMatrix.cs
- TransformPattern.cs
- CorePropertiesFilter.cs
- AbsoluteQuery.cs
- FixedSOMTable.cs
- TypeLibConverter.cs
- SpeechRecognitionEngine.cs
- XmlSchemaAppInfo.cs
- AuthenticatedStream.cs
- TimeoutValidationAttribute.cs
- CodeMemberMethod.cs
- CustomAttribute.cs
- Exceptions.cs
- JsonReaderWriterFactory.cs
- WSSecureConversationFeb2005.cs
- Types.cs
- JsonSerializer.cs
- WorkflowApplicationEventArgs.cs
- ExpandoClass.cs
- XmlSchemaCompilationSettings.cs
- AbandonedMutexException.cs
- EntityViewGenerationConstants.cs
- SafeCoTaskMem.cs
- DataControlCommands.cs
- LocationFactory.cs
- TextureBrush.cs
- TextParaClient.cs
- PermissionSetEnumerator.cs
- NetDataContractSerializer.cs
- Rectangle.cs
- CodeTypeDeclaration.cs
- WindowsIPAddress.cs
- relpropertyhelper.cs
- ValidationService.cs
- FileSystemEventArgs.cs
- RSATokenProvider.cs
- StreamingContext.cs
- AssertSection.cs
- __Filters.cs
- OpCellTreeNode.cs
- BackgroundWorker.cs
- PersonalizationStateInfo.cs
- ValidateNames.cs
- DefaultObjectMappingItemCollection.cs
- DynamicValidatorEventArgs.cs
- RC2.cs
- InputScopeManager.cs
- NameTable.cs
- WpfXamlMember.cs
- TransactionBridgeSection.cs
- TlsnegoTokenAuthenticator.cs
- MultipartContentParser.cs
- XamlToRtfParser.cs
- validationstate.cs
- CodeMemberField.cs
- ParallelTimeline.cs
- ArglessEventHandlerProxy.cs
- ValidateNames.cs
- Line.cs
- UnauthorizedAccessException.cs
- PartitionedDataSource.cs
- ProfileInfo.cs
- ContextMenuStrip.cs
- TargetControlTypeCache.cs
- StylusDownEventArgs.cs
- SystemTcpConnection.cs
- NativeObjectSecurity.cs
- MiniAssembly.cs
- CellCreator.cs
- EndpointPerformanceCounters.cs
- ScriptingJsonSerializationSection.cs
- EnumUnknown.cs
- FreezableDefaultValueFactory.cs
- SplitterCancelEvent.cs
- DashStyles.cs
- RequestCache.cs
- CharacterMetrics.cs
- TypeExtensionSerializer.cs
- WebBrowserNavigatedEventHandler.cs