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
- ErrorWrapper.cs
- SqlParameterCollection.cs
- BrowserCapabilitiesFactory35.cs
- AnimatedTypeHelpers.cs
- HttpProfileGroupBase.cs
- DelayedRegex.cs
- SignerInfo.cs
- NavigationProgressEventArgs.cs
- DockEditor.cs
- EventMap.cs
- CompiledIdentityConstraint.cs
- WindowsTooltip.cs
- SamlAuthenticationStatement.cs
- AuthenticationConfig.cs
- WorkflowRuntimeServiceElement.cs
- ComponentCommands.cs
- Nullable.cs
- CapabilitiesAssignment.cs
- ConditionalBranch.cs
- SessionEndingCancelEventArgs.cs
- ConfigXmlAttribute.cs
- BookmarkUndoUnit.cs
- XComponentModel.cs
- TabRenderer.cs
- TypeUnloadedException.cs
- Propagator.Evaluator.cs
- ImageProxy.cs
- ScrollItemPatternIdentifiers.cs
- CryptoStream.cs
- SecUtil.cs
- securitycriticaldata.cs
- SQLDecimal.cs
- DataGridViewLayoutData.cs
- AbsoluteQuery.cs
- PlaceHolder.cs
- PropertyInformation.cs
- ManualResetEvent.cs
- ManagedWndProcTracker.cs
- RsaSecurityToken.cs
- ErrorWebPart.cs
- UrlMapping.cs
- StateInitializationDesigner.cs
- RuntimeIdentifierPropertyAttribute.cs
- RunClient.cs
- ping.cs
- ToolboxCategory.cs
- FormatException.cs
- UnsafeNativeMethods.cs
- SessionPageStatePersister.cs
- MobileControlDesigner.cs
- SmtpTransport.cs
- Resources.Designer.cs
- UnauthorizedWebPart.cs
- EmptyStringExpandableObjectConverter.cs
- RetrieveVirtualItemEventArgs.cs
- FamilyMap.cs
- StyleCollection.cs
- ConcurrencyMode.cs
- SqlDataSourceEnumerator.cs
- ElementNotAvailableException.cs
- DocumentPageTextView.cs
- MessageEncoder.cs
- SessionPageStatePersister.cs
- TabItemWrapperAutomationPeer.cs
- MediaSystem.cs
- Metafile.cs
- SymDocumentType.cs
- SqlGenericUtil.cs
- DependencyObject.cs
- ToolstripProfessionalRenderer.cs
- SiteMapNode.cs
- InvokeBinder.cs
- ClientApiGenerator.cs
- DropShadowBitmapEffect.cs
- IDReferencePropertyAttribute.cs
- UpdatePanelControlTrigger.cs
- TagElement.cs
- DateTimeValueSerializerContext.cs
- MaterialCollection.cs
- Light.cs
- DataGridCaption.cs
- ItemMap.cs
- ObjectKeyFrameCollection.cs
- StringAttributeCollection.cs
- Point3D.cs
- LogRestartAreaEnumerator.cs
- IfJoinedCondition.cs
- Model3DGroup.cs
- StaticFileHandler.cs
- HttpHeaderCollection.cs
- ToolStripComboBox.cs
- XamlBrushSerializer.cs
- DesignerInterfaces.cs
- DirectionalLight.cs
- StorageSetMapping.cs
- EventWaitHandleSecurity.cs
- Event.cs
- TabItemAutomationPeer.cs
- TokenCreationParameter.cs
- WebControl.cs