Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DataFormat.cs
- VirtualPathUtility.cs
- ImageMapEventArgs.cs
- AttributeCollection.cs
- DbSourceParameterCollection.cs
- VectorValueSerializer.cs
- PresentationTraceSources.cs
- MouseGesture.cs
- AdapterDictionary.cs
- DbReferenceCollection.cs
- IdentityNotMappedException.cs
- TableCellAutomationPeer.cs
- EnumerableWrapperWeakToStrong.cs
- HMACSHA384.cs
- ToolbarAUtomationPeer.cs
- ToolStripPanelRow.cs
- DesignerActionItemCollection.cs
- Serializer.cs
- TemplateInstanceAttribute.cs
- HMACSHA512.cs
- RegisteredDisposeScript.cs
- SendKeys.cs
- ScriptManagerProxy.cs
- InfoCardArgumentException.cs
- ControlDesigner.cs
- SqlDataReaderSmi.cs
- WebBrowserUriTypeConverter.cs
- DbConnectionPoolGroupProviderInfo.cs
- DispatcherHooks.cs
- HtmlTableRow.cs
- TextEditorCopyPaste.cs
- TTSEvent.cs
- DebugHandleTracker.cs
- PropertyTabChangedEvent.cs
- ConnectionStringsSection.cs
- DataGridRowEventArgs.cs
- WebControlAdapter.cs
- ContactManager.cs
- Geometry3D.cs
- precedingsibling.cs
- CreateUserWizardStep.cs
- Separator.cs
- HttpChannelHelper.cs
- PackageProperties.cs
- TableLayoutPanelCellPosition.cs
- DataTableExtensions.cs
- ValidateNames.cs
- PermissionListSet.cs
- BamlTreeMap.cs
- ControllableStoryboardAction.cs
- SubstitutionList.cs
- Triplet.cs
- MemoryMappedViewStream.cs
- TreeViewHitTestInfo.cs
- TextControl.cs
- XamlGridLengthSerializer.cs
- ProtocolsSection.cs
- updateconfighost.cs
- DataColumnChangeEvent.cs
- RSAPKCS1SignatureDeformatter.cs
- CqlErrorHelper.cs
- MimeReflector.cs
- XmlNodeChangedEventManager.cs
- CreateUserWizardStep.cs
- DataTableReaderListener.cs
- IntSecurity.cs
- ClientConfigurationHost.cs
- Int16Converter.cs
- FontDifferentiator.cs
- CommittableTransaction.cs
- TypedTableGenerator.cs
- DoubleKeyFrameCollection.cs
- milexports.cs
- RtfControlWordInfo.cs
- XmlILAnnotation.cs
- ZipIORawDataFileBlock.cs
- HitTestDrawingContextWalker.cs
- ClientSettingsStore.cs
- CipherData.cs
- CellQuery.cs
- ObjectViewQueryResultData.cs
- HttpProfileBase.cs
- ApplicationException.cs
- BindingCompleteEventArgs.cs
- XmlObjectSerializerWriteContext.cs
- Variant.cs
- TextTreeTextNode.cs
- UserControlCodeDomTreeGenerator.cs
- SynchronizingStream.cs
- TypeRefElement.cs
- UnsafeNativeMethodsCLR.cs
- _HelperAsyncResults.cs
- ContextStaticAttribute.cs
- FrameAutomationPeer.cs
- ClusterSafeNativeMethods.cs
- WebPartExportVerb.cs
- BamlTreeMap.cs
- HttpCacheVary.cs
- StrongNameKeyPair.cs
- WebPartDisplayModeCancelEventArgs.cs