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
- NeutralResourcesLanguageAttribute.cs
- DataGridViewUtilities.cs
- Condition.cs
- Evidence.cs
- SetterBase.cs
- RadioButton.cs
- TableLayoutStyleCollection.cs
- MultipartIdentifier.cs
- WebAdminConfigurationHelper.cs
- _RequestCacheProtocol.cs
- SqlTriggerAttribute.cs
- ForAllOperator.cs
- RegexBoyerMoore.cs
- StrongNameSignatureInformation.cs
- ValueOfAction.cs
- TextSchema.cs
- ParentQuery.cs
- PointCollectionConverter.cs
- AppDomainAttributes.cs
- BamlReader.cs
- ToolStripContextMenu.cs
- ZoomPercentageConverter.cs
- ListViewUpdateEventArgs.cs
- DynamicEntity.cs
- XmlSchemaDatatype.cs
- SerializeAbsoluteContext.cs
- SqlDataSourceQueryEditorForm.cs
- SoapIncludeAttribute.cs
- WebBrowserPermission.cs
- PropertyFilter.cs
- MultipleViewProviderWrapper.cs
- ToolStripMenuItem.cs
- InteropEnvironment.cs
- HandleValueEditor.cs
- ListViewDeletedEventArgs.cs
- TableLayout.cs
- TextDecorations.cs
- RuntimeVariablesExpression.cs
- AttributeTable.cs
- ActiveXHost.cs
- CellQuery.cs
- EmptyQuery.cs
- SmiEventSink_Default.cs
- InvalidAsynchronousStateException.cs
- ColorAnimationUsingKeyFrames.cs
- ConfigurationSettings.cs
- HwndKeyboardInputProvider.cs
- CapabilitiesState.cs
- PasswordRecovery.cs
- NativeMethods.cs
- WebPartChrome.cs
- BeginStoryboard.cs
- XmlCompatibilityReader.cs
- ProxyHwnd.cs
- ContourSegment.cs
- PrefixQName.cs
- DropTarget.cs
- ContainerSelectorGlyph.cs
- InternalMappingException.cs
- SecurityPolicySection.cs
- fixedPageContentExtractor.cs
- CrossSiteScriptingValidation.cs
- TrustManager.cs
- HostedHttpContext.cs
- HostUtils.cs
- DataSourceXmlTextReader.cs
- LockRecoveryTask.cs
- CatchBlock.cs
- DiscriminatorMap.cs
- XmlCharType.cs
- GridViewColumnCollectionChangedEventArgs.cs
- CustomAttributeSerializer.cs
- SpAudioStreamWrapper.cs
- DurableOperationContext.cs
- Panel.cs
- XmlSerializer.cs
- __ConsoleStream.cs
- MailDefinition.cs
- XmlIterators.cs
- AttributeCollection.cs
- RecordConverter.cs
- MultipleViewPattern.cs
- URLEditor.cs
- TraceSource.cs
- TypefaceMetricsCache.cs
- SqlClientMetaDataCollectionNames.cs
- DataRowExtensions.cs
- Activity.cs
- AssociationTypeEmitter.cs
- BinaryFormatterSinks.cs
- UriTemplateClientFormatter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ExpressionDumper.cs
- DbConvert.cs
- ProcessHostServerConfig.cs
- TextEditorMouse.cs
- LineProperties.cs
- TextDecorationCollection.cs
- Not.cs
- BehaviorEditorPart.cs