Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SerializationObjectManager.cs
- Application.cs
- RequestQueryProcessor.cs
- CompoundFileStreamReference.cs
- UdpMessageProperty.cs
- TextTreeNode.cs
- DialogDivider.cs
- Helper.cs
- MaskInputRejectedEventArgs.cs
- ProjectedSlot.cs
- WpfPayload.cs
- ValueProviderWrapper.cs
- TypeConverter.cs
- ExpandSegmentCollection.cs
- ContextDataSourceView.cs
- BulletedList.cs
- CancellationState.cs
- CodeSnippetTypeMember.cs
- Scheduler.cs
- DomNameTable.cs
- ErrorEventArgs.cs
- ParserExtension.cs
- GridItemCollection.cs
- StateWorkerRequest.cs
- HttpModuleCollection.cs
- XmlSchemaObjectCollection.cs
- WizardPanel.cs
- ActiveXHelper.cs
- TextLine.cs
- DesignerSerializerAttribute.cs
- PowerModeChangedEventArgs.cs
- MessageSmuggler.cs
- BindingMemberInfo.cs
- CollectionViewSource.cs
- XmlArrayAttribute.cs
- ToolStripContentPanel.cs
- FixedSOMSemanticBox.cs
- AlphabetConverter.cs
- ArgumentException.cs
- BindingExpression.cs
- control.ime.cs
- PropertyCondition.cs
- PageContent.cs
- DataControlCommands.cs
- QueryAsyncResult.cs
- StoreAnnotationsMap.cs
- NetPeerTcpBinding.cs
- Border.cs
- OdbcConnectionString.cs
- RegexWorker.cs
- SafeLocalMemHandle.cs
- PropertyRef.cs
- SQLUtility.cs
- HtmlEmptyTagControlBuilder.cs
- CancellationScope.cs
- FormViewDesigner.cs
- ElementHost.cs
- SoapObjectReader.cs
- DeclarationUpdate.cs
- LineGeometry.cs
- PauseStoryboard.cs
- DynamicFilter.cs
- LineMetrics.cs
- fixedPageContentExtractor.cs
- LogicalChannel.cs
- Keywords.cs
- PersistChildrenAttribute.cs
- ContentFileHelper.cs
- FunctionDetailsReader.cs
- DataGridViewTopLeftHeaderCell.cs
- DynamicMetaObject.cs
- ConstraintManager.cs
- WebPartCatalogAddVerb.cs
- IntegrationExceptionEventArgs.cs
- DeleteMemberBinder.cs
- JavaScriptString.cs
- BitSet.cs
- ChameleonKey.cs
- ContextMenu.cs
- StylusDevice.cs
- IPipelineRuntime.cs
- HiddenField.cs
- LassoHelper.cs
- InkCollectionBehavior.cs
- MappingException.cs
- WinFormsSpinner.cs
- DataGridTablesFactory.cs
- DecimalAnimationUsingKeyFrames.cs
- WebPartDescriptionCollection.cs
- ButtonBase.cs
- StylusEditingBehavior.cs
- SelectionHighlightInfo.cs
- ADRole.cs
- FragmentQueryProcessor.cs
- FormParameter.cs
- ViewGenerator.cs
- AtomServiceDocumentSerializer.cs
- SelfIssuedTokenFactoryCredential.cs
- TableLayoutPanelCodeDomSerializer.cs
- TabletDeviceInfo.cs