Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / newinstructionaction.cs / 1305376 / 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 (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl) && Ref.Equal(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 (Ref.Equal(input.NamespaceURI, input.Atoms.UriXsl) && Ref.Equal(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
- ConstructorBuilder.cs
- Soap.cs
- RowParagraph.cs
- PersonalizationProviderHelper.cs
- AssemblyFilter.cs
- Matrix3DStack.cs
- GraphicsContainer.cs
- WebBrowserProgressChangedEventHandler.cs
- DiscriminatorMap.cs
- VisualTreeHelper.cs
- ControlParameter.cs
- ThemeInfoAttribute.cs
- AccessedThroughPropertyAttribute.cs
- SynchronizedCollection.cs
- Configuration.cs
- PathParser.cs
- SimpleModelProvider.cs
- WebRequestModuleElementCollection.cs
- _TLSstream.cs
- PeerCustomResolverElement.cs
- BinaryConverter.cs
- ExpressionQuoter.cs
- XmlQueryCardinality.cs
- DataServiceContext.cs
- AuthenticodeSignatureInformation.cs
- WorkflowIdleElement.cs
- HexParser.cs
- DiscoveryClientProtocol.cs
- NativeMethods.cs
- MsmqIntegrationMessagePool.cs
- MultiView.cs
- ValueConversionAttribute.cs
- NullableLongSumAggregationOperator.cs
- XmlTextReader.cs
- SafeFileHandle.cs
- ResizeGrip.cs
- GridEntryCollection.cs
- ImageList.cs
- EntryIndex.cs
- AxHostDesigner.cs
- OleDbRowUpdatingEvent.cs
- LinqExpressionNormalizer.cs
- NumberSubstitution.cs
- ProviderCommandInfoUtils.cs
- DataGridViewBindingCompleteEventArgs.cs
- CommonDialog.cs
- HttpRequest.cs
- ConsoleKeyInfo.cs
- ExpressionVisitor.cs
- DbConnectionPoolCounters.cs
- RectAnimation.cs
- EncoderParameter.cs
- ResourceSet.cs
- DuplicateWaitObjectException.cs
- UrlAuthorizationModule.cs
- BaseCAMarshaler.cs
- Odbc32.cs
- StringConverter.cs
- XsltSettings.cs
- LiteralControl.cs
- SystemMulticastIPAddressInformation.cs
- GraphicsContext.cs
- SatelliteContractVersionAttribute.cs
- WaitHandle.cs
- MultiPageTextView.cs
- ControlDesigner.cs
- XmlFormatExtensionAttribute.cs
- RealizationDrawingContextWalker.cs
- ViewGenResults.cs
- UIElementPropertyUndoUnit.cs
- CookielessHelper.cs
- DataObject.cs
- SqlMethodAttribute.cs
- ColorContext.cs
- WebZone.cs
- DesignerAdapterUtil.cs
- XmlIlVisitor.cs
- RecommendedAsConfigurableAttribute.cs
- _CacheStreams.cs
- DtrList.cs
- URL.cs
- TdsEnums.cs
- SafeCryptHandles.cs
- Compiler.cs
- AxHost.cs
- FormatterServicesNoSerializableCheck.cs
- UserInitiatedRoutedEventPermission.cs
- File.cs
- MembershipValidatePasswordEventArgs.cs
- BuildDependencySet.cs
- EditorServiceContext.cs
- ExtensionFile.cs
- ProfileModule.cs
- ItemsPanelTemplate.cs
- DefaultValueAttribute.cs
- DetailsViewPageEventArgs.cs
- EntityDataSourceContextCreatedEventArgs.cs
- DataGridViewTopRowAccessibleObject.cs
- TextBoxLine.cs
- AppLevelCompilationSectionCache.cs