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 / newinstructionaction.cs / 1 / newinstructionaction.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 NewInstructionAction : ContainerAction { string name; string parent; bool fallback; internal override void Compile(Compiler compiler) { XPathNavigator nav = compiler.Input.Navigator.Clone(); name = nav.Name; nav.MoveToParent(); parent = nav.Name; if (compiler.Recurse()) { CompileSelectiveTemplate(compiler); compiler.ToParent(); } } internal void CompileSelectiveTemplate(Compiler compiler){ NavigatorInput input = compiler.Input; do{ if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace) && Keywords.Equals(input.LocalName, input.Atoms.Fallback)){ fallback = true; if (compiler.Recurse()){ CompileTemplate(compiler); compiler.ToParent(); } } } while (compiler.Advance()); } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (!fallback) { throw XsltException.Create(Res.Xslt_UnknownExtensionElement, this.name); } if (this.containedActions != null && this.containedActions.Count > 0) { processor.PushActionFrame(frame); frame.State = ProcessingChildren; break; } else goto case ProcessingChildren; case ProcessingChildren: frame.Finished(); break; default: Debug.Fail("Invalid Container action execution state"); break; } } } } // 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 NewInstructionAction : ContainerAction { string name; string parent; bool fallback; internal override void Compile(Compiler compiler) { XPathNavigator nav = compiler.Input.Navigator.Clone(); name = nav.Name; nav.MoveToParent(); parent = nav.Name; if (compiler.Recurse()) { CompileSelectiveTemplate(compiler); compiler.ToParent(); } } internal void CompileSelectiveTemplate(Compiler compiler){ NavigatorInput input = compiler.Input; do{ if (Keywords.Equals(input.NamespaceURI, input.Atoms.XsltNamespace) && Keywords.Equals(input.LocalName, input.Atoms.Fallback)){ fallback = true; if (compiler.Recurse()){ CompileTemplate(compiler); compiler.ToParent(); } } } while (compiler.Advance()); } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (!fallback) { throw XsltException.Create(Res.Xslt_UnknownExtensionElement, this.name); } if (this.containedActions != null && this.containedActions.Count > 0) { processor.PushActionFrame(frame); frame.State = ProcessingChildren; break; } else goto case ProcessingChildren; case ProcessingChildren: frame.Finished(); break; default: Debug.Fail("Invalid Container action execution state"); break; } } } } // 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
- SoapTypeAttribute.cs
- FixedDocumentPaginator.cs
- DataBoundLiteralControl.cs
- FigureHelper.cs
- XhtmlBasicPhoneCallAdapter.cs
- ObjectDataSourceChooseMethodsPanel.cs
- TextBounds.cs
- BinHexDecoder.cs
- DbConnectionPoolOptions.cs
- WebControlParameterProxy.cs
- InvalidComObjectException.cs
- MatchingStyle.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- StsCommunicationException.cs
- InkCanvasAutomationPeer.cs
- HitTestResult.cs
- XmlQueryStaticData.cs
- SqlDataSourceFilteringEventArgs.cs
- DynamicObjectAccessor.cs
- SettingsBindableAttribute.cs
- CodeSubDirectory.cs
- ToolBarOverflowPanel.cs
- WebPartEditVerb.cs
- TabPage.cs
- HuffModule.cs
- TrustVersion.cs
- MessageBox.cs
- XmlLinkedNode.cs
- HtmlInputReset.cs
- DesignerActionItem.cs
- DataServiceException.cs
- TypeConverterHelper.cs
- BrowserCapabilitiesCompiler.cs
- WebPartHelpVerb.cs
- RequestCacheValidator.cs
- DBConcurrencyException.cs
- FormsAuthenticationConfiguration.cs
- GlyphRun.cs
- BamlLocalizationDictionary.cs
- TypeDelegator.cs
- WebPartZoneDesigner.cs
- ObjectDataSourceFilteringEventArgs.cs
- XmlSchemaObjectTable.cs
- ResourceKey.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- TailCallAnalyzer.cs
- BitmapData.cs
- NamespaceMapping.cs
- LinkLabel.cs
- MdiWindowListItemConverter.cs
- EarlyBoundInfo.cs
- ConfigXmlComment.cs
- ExceptionHandler.cs
- ProcessHost.cs
- Attributes.cs
- SHA512.cs
- ToolStripPanelRenderEventArgs.cs
- ClrPerspective.cs
- DbProviderFactoriesConfigurationHandler.cs
- DefaultExpression.cs
- FactoryGenerator.cs
- DataSourceControl.cs
- HttpEncoder.cs
- InkPresenter.cs
- UntypedNullExpression.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- precedingsibling.cs
- BitmapCodecInfo.cs
- MenuItemCollection.cs
- DataSourceExpressionCollection.cs
- ComponentDispatcherThread.cs
- BitmapPalettes.cs
- Pkcs9Attribute.cs
- DataReceivedEventArgs.cs
- EventMappingSettings.cs
- WmlObjectListAdapter.cs
- SelectionProcessor.cs
- RtfToXamlLexer.cs
- DataRelationPropertyDescriptor.cs
- XmlFormatReaderGenerator.cs
- SortQueryOperator.cs
- PackWebRequest.cs
- EntityTypeEmitter.cs
- Light.cs
- CellQuery.cs
- SqlTriggerAttribute.cs
- EnumMember.cs
- LogicalMethodInfo.cs
- PasswordBox.cs
- Span.cs
- CheckedPointers.cs
- DynamicILGenerator.cs
- CallbackCorrelationInitializer.cs
- ToolStripContentPanel.cs
- HttpCapabilitiesEvaluator.cs
- TextChange.cs
- MediaTimeline.cs
- RightsManagementEncryptionTransform.cs
- ActivityMarkupSerializationProvider.cs
- EventSinkHelperWriter.cs