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
- Label.cs
- TempFiles.cs
- SQLCharsStorage.cs
- TriggerAction.cs
- XsdDuration.cs
- FunctionParameter.cs
- JsonServiceDocumentSerializer.cs
- ClientConfigurationSystem.cs
- ExpressionLink.cs
- MetadataCacheItem.cs
- TextViewElement.cs
- WhileDesigner.cs
- FirstQueryOperator.cs
- WebPartDescription.cs
- MemberInitExpression.cs
- ResXResourceWriter.cs
- SafeCryptoHandles.cs
- ReadOnlyHierarchicalDataSourceView.cs
- LeftCellWrapper.cs
- ProfileGroupSettingsCollection.cs
- RelationalExpressions.cs
- XLinq.cs
- HttpProcessUtility.cs
- PathData.cs
- safePerfProviderHandle.cs
- PersonalizationDictionary.cs
- TransactionalPackage.cs
- ScriptDescriptor.cs
- DataGridViewCellParsingEventArgs.cs
- InstanceOwnerException.cs
- DefaultSection.cs
- DataGridViewCheckBoxColumn.cs
- Sql8ExpressionRewriter.cs
- DPAPIProtectedConfigurationProvider.cs
- InputGestureCollection.cs
- _OSSOCK.cs
- Group.cs
- BevelBitmapEffect.cs
- MenuItem.cs
- EventHandlerList.cs
- MsmqActivation.cs
- RequestQueue.cs
- NativeActivity.cs
- ExtensibleClassFactory.cs
- WasAdminWrapper.cs
- FigureHelper.cs
- COM2PropertyBuilderUITypeEditor.cs
- LayoutEditorPart.cs
- PolicyLevel.cs
- TemplateComponentConnector.cs
- XmlObjectSerializerContext.cs
- DesigntimeLicenseContextSerializer.cs
- ExpanderAutomationPeer.cs
- UnsafeNativeMethods.cs
- NativeMethods.cs
- WorkflowMessageEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- ReadOnlyDataSource.cs
- Soap.cs
- DynamicResourceExtensionConverter.cs
- IndexObject.cs
- ReachUIElementCollectionSerializer.cs
- XmlAggregates.cs
- RbTree.cs
- XmlTextWriter.cs
- WebBrowserBase.cs
- BitmapImage.cs
- ProviderConnectionPointCollection.cs
- GridViewCellAutomationPeer.cs
- _KerberosClient.cs
- OleServicesContext.cs
- ExtenderProvidedPropertyAttribute.cs
- StorageFunctionMapping.cs
- CalloutQueueItem.cs
- MessageQueueInstaller.cs
- CalloutQueueItem.cs
- StatusStrip.cs
- PropertyInformation.cs
- MessageOperationFormatter.cs
- PointValueSerializer.cs
- HtmlSelect.cs
- PublishLicense.cs
- SystemBrushes.cs
- DataExchangeServiceBinder.cs
- FormViewPageEventArgs.cs
- PrintDialog.cs
- ClosureBinding.cs
- OleDbParameter.cs
- ApplicationContext.cs
- ResetableIterator.cs
- MouseWheelEventArgs.cs
- ParseHttpDate.cs
- Parsers.cs
- GridViewDeletedEventArgs.cs
- Pkcs7Recipient.cs
- OuterGlowBitmapEffect.cs
- DbDataSourceEnumerator.cs
- DataGridViewCellConverter.cs
- RadioButton.cs
- BackgroundFormatInfo.cs