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
- RewritingPass.cs
- BitmapEffectDrawingContextState.cs
- Calendar.cs
- KeyInstance.cs
- DataBindingCollectionEditor.cs
- CorrelationKey.cs
- ExpanderAutomationPeer.cs
- ServiceOperationInvoker.cs
- InvariantComparer.cs
- KeyedQueue.cs
- SrgsItemList.cs
- BaseCodeDomTreeGenerator.cs
- AssociationSetEnd.cs
- DesignerActionKeyboardBehavior.cs
- TextProperties.cs
- dbdatarecord.cs
- TrustManager.cs
- EntityDataSourceContextCreatingEventArgs.cs
- MessageDecoder.cs
- DebugTracing.cs
- TrackingCondition.cs
- SslStream.cs
- SrgsSemanticInterpretationTag.cs
- WebPartTransformerAttribute.cs
- MarkupObject.cs
- ColorTransformHelper.cs
- Typeface.cs
- FormClosedEvent.cs
- RequestUriProcessor.cs
- BigInt.cs
- BitmapMetadata.cs
- CellQuery.cs
- InternalPermissions.cs
- TreeWalkHelper.cs
- Marshal.cs
- AddressAlreadyInUseException.cs
- Grant.cs
- AbstractSvcMapFileLoader.cs
- MsmqInputChannelListenerBase.cs
- UnsafeNativeMethods.cs
- NullableBoolConverter.cs
- ServiceHost.cs
- XmlLangPropertyAttribute.cs
- AppSecurityManager.cs
- safePerfProviderHandle.cs
- DataPager.cs
- CharConverter.cs
- FormViewPageEventArgs.cs
- DirectoryObjectSecurity.cs
- CultureTable.cs
- WebBrowserNavigatedEventHandler.cs
- Size.cs
- ImpersonationContext.cs
- ChannelSinkStacks.cs
- XmlSignificantWhitespace.cs
- Crc32.cs
- DataSourceCache.cs
- FixedPageProcessor.cs
- DataServiceRequestException.cs
- ReadOnlyCollection.cs
- X509Certificate.cs
- SafeViewOfFileHandle.cs
- TargetInvocationException.cs
- DesignerEditorPartChrome.cs
- DataTableMapping.cs
- RegistryConfigurationProvider.cs
- Quad.cs
- ToolStripHighContrastRenderer.cs
- AcceleratedTokenProvider.cs
- PixelShader.cs
- EUCJPEncoding.cs
- Grid.cs
- WebPartConnectionsConnectVerb.cs
- RegistrySecurity.cs
- FormViewInsertEventArgs.cs
- PersistenceException.cs
- DictionaryChange.cs
- ArglessEventHandlerProxy.cs
- IDispatchConstantAttribute.cs
- MemberInitExpression.cs
- SqlCaseSimplifier.cs
- Model3D.cs
- GridItemPatternIdentifiers.cs
- BindUriHelper.cs
- ProfileBuildProvider.cs
- Common.cs
- FontFamilyConverter.cs
- FloatMinMaxAggregationOperator.cs
- UnconditionalPolicy.cs
- ValidatorAttribute.cs
- TimeStampChecker.cs
- DataServiceQueryException.cs
- errorpatternmatcher.cs
- KeyValueConfigurationCollection.cs
- DefaultValueTypeConverter.cs
- Emitter.cs
- RowToParametersTransformer.cs
- TextFormatterContext.cs
- WebPartsSection.cs
- DebugTracing.cs