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
- URI.cs
- SimpleHandlerFactory.cs
- PriorityBindingExpression.cs
- Literal.cs
- StateWorkerRequest.cs
- ProfileWorkflowElement.cs
- FreezableOperations.cs
- MediaElement.cs
- RenderTargetBitmap.cs
- SQLGuidStorage.cs
- DropSourceBehavior.cs
- DataContext.cs
- AutoGeneratedFieldProperties.cs
- WizardStepCollectionEditor.cs
- UntypedNullExpression.cs
- ContextMenu.cs
- ConfigurationSection.cs
- TextOnlyOutput.cs
- RowToFieldTransformer.cs
- IIS7UserPrincipal.cs
- TransformerInfoCollection.cs
- CompilationSection.cs
- StaticExtension.cs
- WindowsFormsSynchronizationContext.cs
- WebPartDisplayModeCancelEventArgs.cs
- WorkflowDispatchContext.cs
- UInt16Storage.cs
- MdImport.cs
- TextSchema.cs
- KeyValuePair.cs
- XPathAxisIterator.cs
- DataObjectAttribute.cs
- CachedPathData.cs
- recordstatefactory.cs
- PowerStatus.cs
- Stylesheet.cs
- XmlTextEncoder.cs
- XmlNamespaceDeclarationsAttribute.cs
- ClassHandlersStore.cs
- EntityParameterCollection.cs
- SettingsProperty.cs
- DeleteMemberBinder.cs
- TextPattern.cs
- PageVisual.cs
- Exception.cs
- ISAPIApplicationHost.cs
- SelectionPattern.cs
- CuspData.cs
- x509store.cs
- AlphabetConverter.cs
- Array.cs
- XmlBinaryReader.cs
- InstanceCreationEditor.cs
- MultipartContentParser.cs
- WindowsRegion.cs
- PathData.cs
- documentsequencetextview.cs
- RSAOAEPKeyExchangeFormatter.cs
- SafeReversePInvokeHandle.cs
- UnsafeNativeMethods.cs
- PreviewPageInfo.cs
- XamlSerializerUtil.cs
- AdRotator.cs
- RegexReplacement.cs
- ToolStripSplitButton.cs
- ParserExtension.cs
- ClockGroup.cs
- SelectiveScrollingGrid.cs
- D3DImage.cs
- FixedPageProcessor.cs
- TagNameToTypeMapper.cs
- DeobfuscatingStream.cs
- SynchronousChannel.cs
- Barrier.cs
- SHA256Managed.cs
- TextTabProperties.cs
- AuthenticationModulesSection.cs
- ScrollBar.cs
- ApplicationSecurityInfo.cs
- SystemWebSectionGroup.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- IISUnsafeMethods.cs
- StatusBarDrawItemEvent.cs
- DebugController.cs
- FixedSOMTableRow.cs
- Padding.cs
- SystemThemeKey.cs
- ExecutedRoutedEventArgs.cs
- NativeMethods.cs
- ProvidersHelper.cs
- DateTimeOffset.cs
- RecordsAffectedEventArgs.cs
- ConfigurationManagerInternalFactory.cs
- BrowsableAttribute.cs
- WindowsButton.cs
- ProxyAttribute.cs
- SectionInput.cs
- DomNameTable.cs
- VariableModifiersHelper.cs
- PageWrapper.cs