Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1305376 / 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
- CompositeFontInfo.cs
- TransformerInfoCollection.cs
- BmpBitmapDecoder.cs
- LayoutEngine.cs
- ResourceDescriptionAttribute.cs
- ArrayHelper.cs
- EventBookmark.cs
- FontFamilyIdentifier.cs
- ButtonBaseAutomationPeer.cs
- GridItemProviderWrapper.cs
- SurrogateSelector.cs
- AttributeParameterInfo.cs
- ProgressBarAutomationPeer.cs
- HtmlFormParameterReader.cs
- UserNamePasswordValidator.cs
- ConfigXmlDocument.cs
- XmlSchemaObjectTable.cs
- SamlAction.cs
- ProcessHostFactoryHelper.cs
- DynamicPropertyHolder.cs
- DocumentXmlWriter.cs
- Model3DGroup.cs
- TypeCollectionPropertyEditor.cs
- WebHttpDispatchOperationSelectorData.cs
- JsonDataContract.cs
- MenuItemStyleCollection.cs
- FileDocument.cs
- TabletCollection.cs
- WebEventTraceProvider.cs
- QueryAccessibilityHelpEvent.cs
- Hex.cs
- ConfigurationElementCollection.cs
- PropertyGridView.cs
- DockPatternIdentifiers.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SQLString.cs
- FrameworkContentElement.cs
- FormsAuthenticationTicket.cs
- GeneralTransform3D.cs
- SQLGuidStorage.cs
- Tablet.cs
- SafeCoTaskMem.cs
- CustomAttribute.cs
- XmlDigitalSignatureProcessor.cs
- DesignerLinkAdapter.cs
- SessionPageStatePersister.cs
- SizeConverter.cs
- Calendar.cs
- SecureUICommand.cs
- ObjectDataSourceMethodEventArgs.cs
- DesignerDataSourceView.cs
- BamlStream.cs
- Style.cs
- UncommonField.cs
- Error.cs
- SoapTypeAttribute.cs
- WebConfigurationFileMap.cs
- SafeProcessHandle.cs
- Math.cs
- SrgsRule.cs
- DrawItemEvent.cs
- FixedSOMTable.cs
- NumberSubstitution.cs
- UriSectionData.cs
- Point.cs
- ApplicationHost.cs
- CharEnumerator.cs
- PathGeometry.cs
- MarkupCompilePass1.cs
- DataContractJsonSerializer.cs
- TaiwanLunisolarCalendar.cs
- BitmapDownload.cs
- RangeValueProviderWrapper.cs
- EmbossBitmapEffect.cs
- OracleDateTime.cs
- TypedReference.cs
- CodeAccessSecurityEngine.cs
- StringComparer.cs
- ObjectNotFoundException.cs
- PropertyMetadata.cs
- PointCollectionValueSerializer.cs
- DoubleCollectionValueSerializer.cs
- ExtensibleSyndicationObject.cs
- InvokePatternIdentifiers.cs
- WS2007FederationHttpBindingElement.cs
- PersistenceIOParticipant.cs
- NGCUIElementCollectionSerializerAsync.cs
- ToolboxDataAttribute.cs
- VectorCollection.cs
- BrowserDefinition.cs
- ExpandCollapseProviderWrapper.cs
- CategoryEditor.cs
- PolicyStatement.cs
- SchemaCollectionCompiler.cs
- ActivityExecutorSurrogate.cs
- OwnerDrawPropertyBag.cs
- glyphs.cs
- XPathBuilder.cs
- UnauthorizedWebPart.cs
- LineMetrics.cs