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
- DateBoldEvent.cs
- ValidationErrorEventArgs.cs
- ResourceDisplayNameAttribute.cs
- Compensation.cs
- SystemFonts.cs
- ThreadSafeList.cs
- Converter.cs
- ToolStripButton.cs
- DuplicateWaitObjectException.cs
- AsyncDataRequest.cs
- TextChange.cs
- CheckBox.cs
- XdrBuilder.cs
- DateTimeOffsetConverter.cs
- Int64KeyFrameCollection.cs
- StateMachineHelpers.cs
- TemplateControlParser.cs
- FixedSOMTableRow.cs
- CustomCategoryAttribute.cs
- RemotingSurrogateSelector.cs
- AuthenticateEventArgs.cs
- IriParsingElement.cs
- HotSpot.cs
- ConsoleCancelEventArgs.cs
- DocumentGrid.cs
- EntityDataSourceWrapper.cs
- ViewUtilities.cs
- WorkflowRuntimeSection.cs
- PDBReader.cs
- SingleKeyFrameCollection.cs
- XmlSchemaObject.cs
- XPathAxisIterator.cs
- DesignerTransactionCloseEvent.cs
- MasterPageParser.cs
- DoubleAverageAggregationOperator.cs
- MetaModel.cs
- DataControlLinkButton.cs
- BaseAppDomainProtocolHandler.cs
- BaseComponentEditor.cs
- DtdParser.cs
- HttpRequestCacheValidator.cs
- SelectedDatesCollection.cs
- SdlChannelSink.cs
- HtmlElementErrorEventArgs.cs
- GC.cs
- ReferentialConstraint.cs
- CallbackTimeoutsBehavior.cs
- QuarticEase.cs
- TextDecoration.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ExternalException.cs
- QilValidationVisitor.cs
- dataobject.cs
- ModuleBuilderData.cs
- ArraySegment.cs
- PublishLicense.cs
- HostedElements.cs
- MarginsConverter.cs
- GridViewDeletedEventArgs.cs
- TextOutput.cs
- BezierSegment.cs
- WebPartCatalogCloseVerb.cs
- RoutedEventValueSerializer.cs
- SerializationException.cs
- ScrollBar.cs
- QueryAsyncResult.cs
- StylusEditingBehavior.cs
- RawAppCommandInputReport.cs
- Listbox.cs
- WCFServiceClientProxyGenerator.cs
- Collection.cs
- ReservationCollection.cs
- _AutoWebProxyScriptWrapper.cs
- mediaclock.cs
- WebPartCancelEventArgs.cs
- TcpHostedTransportConfiguration.cs
- Int32Rect.cs
- ProviderIncompatibleException.cs
- DoubleLinkList.cs
- TableLayoutRowStyleCollection.cs
- StyleXamlParser.cs
- ProfileProvider.cs
- LinqToSqlWrapper.cs
- WinInetCache.cs
- WebHeaderCollection.cs
- KeyValueInternalCollection.cs
- ScriptServiceAttribute.cs
- OleDbFactory.cs
- AbandonedMutexException.cs
- Stylesheet.cs
- InstanceLockLostException.cs
- _NTAuthentication.cs
- Matrix3D.cs
- Endpoint.cs
- HttpFileCollection.cs
- Stroke2.cs
- SelectionItemProviderWrapper.cs
- DataGridViewColumnConverter.cs
- DataGridViewRowsAddedEventArgs.cs
- AssemblyLoader.cs