Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- StatusBarAutomationPeer.cs
- IxmlLineInfo.cs
- RIPEMD160.cs
- XamlToRtfWriter.cs
- ConfigXmlSignificantWhitespace.cs
- LiteralLink.cs
- ReturnType.cs
- HMACSHA384.cs
- CursorConverter.cs
- AnimatedTypeHelpers.cs
- AssemblySettingAttributes.cs
- GeometryDrawing.cs
- ZipIOFileItemStream.cs
- SearchForVirtualItemEventArgs.cs
- VirtualDirectoryMapping.cs
- Int32RectValueSerializer.cs
- DataViewManager.cs
- Byte.cs
- FileUtil.cs
- FileDataSourceCache.cs
- SecurityUtils.cs
- PersistStreamTypeWrapper.cs
- SoapDocumentMethodAttribute.cs
- CachedBitmap.cs
- Rect.cs
- ScriptResourceAttribute.cs
- ListView.cs
- CrossAppDomainChannel.cs
- DependencyPropertyAttribute.cs
- WebSysDescriptionAttribute.cs
- ReferencedCollectionType.cs
- HWStack.cs
- PointKeyFrameCollection.cs
- SafeNativeMethods.cs
- Brush.cs
- SqlExpressionNullability.cs
- SapiGrammar.cs
- WindowsFormsHostPropertyMap.cs
- ObjectParameter.cs
- HGlobalSafeHandle.cs
- XPathDocument.cs
- SoapFaultCodes.cs
- MetadataHelper.cs
- RectKeyFrameCollection.cs
- StandardCommandToolStripMenuItem.cs
- DigitalSignatureProvider.cs
- FrugalList.cs
- GenericsInstances.cs
- FullTextState.cs
- PostBackOptions.cs
- BlurBitmapEffect.cs
- PropVariant.cs
- ReturnValue.cs
- _Events.cs
- HttpRequest.cs
- StylusPointPropertyInfo.cs
- DataGridRow.cs
- CheckBoxField.cs
- ComplexPropertyEntry.cs
- AjaxFrameworkAssemblyAttribute.cs
- CustomPopupPlacement.cs
- PermissionAttributes.cs
- ListBox.cs
- KnownBoxes.cs
- CheckableControlBaseAdapter.cs
- HiddenField.cs
- WindowsSecurityTokenAuthenticator.cs
- PersonalizationProvider.cs
- InputReportEventArgs.cs
- SafeCryptHandles.cs
- TraceHandlerErrorFormatter.cs
- PartitionResolver.cs
- ToolStripTextBox.cs
- ConnectorRouter.cs
- ParseHttpDate.cs
- ColumnWidthChangingEvent.cs
- ScriptingAuthenticationServiceSection.cs
- BufferModeSettings.cs
- ItemContainerGenerator.cs
- Console.cs
- ECDsa.cs
- DerivedKeySecurityToken.cs
- connectionpool.cs
- MappingException.cs
- DbExpressionBuilder.cs
- DataGridViewCheckBoxCell.cs
- DataServiceQueryContinuation.cs
- UseLicense.cs
- CompletionProxy.cs
- DataRowCollection.cs
- FromRequest.cs
- GridItemProviderWrapper.cs
- TcpProcessProtocolHandler.cs
- OAVariantLib.cs
- SubclassTypeValidatorAttribute.cs
- DBSqlParserColumnCollection.cs
- ContainerUtilities.cs
- HtmlLink.cs
- documentsequencetextview.cs
- TextSegment.cs