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
- DesignerActionVerbItem.cs
- WebResourceAttribute.cs
- SerialErrors.cs
- SoapClientMessage.cs
- Subtree.cs
- ExpressionBuilderContext.cs
- MDIWindowDialog.cs
- StructuralType.cs
- PagerSettings.cs
- DuplicateContext.cs
- SubqueryRules.cs
- DataGridViewEditingControlShowingEventArgs.cs
- FactorySettingsElement.cs
- loginstatus.cs
- BoundConstants.cs
- OracleDataReader.cs
- HtmlTable.cs
- Validator.cs
- DragEvent.cs
- ToolStripDropDownClosingEventArgs.cs
- SchemaExporter.cs
- StringFunctions.cs
- FontUnit.cs
- SmtpSection.cs
- TextDecorationLocationValidation.cs
- GetFileNameResult.cs
- ParenthesizePropertyNameAttribute.cs
- Container.cs
- PersonalizationEntry.cs
- Point.cs
- TextBoxBase.cs
- BitmapDownload.cs
- ProgramNode.cs
- PopupEventArgs.cs
- OletxEnlistment.cs
- ChangeToolStripParentVerb.cs
- SqlErrorCollection.cs
- TypefaceMetricsCache.cs
- AlignmentXValidation.cs
- CollectionChange.cs
- EventLogPermissionEntryCollection.cs
- Activator.cs
- BitmapImage.cs
- SafeEventLogWriteHandle.cs
- AuthenticationSection.cs
- DataGridClipboardCellContent.cs
- FloaterBaseParaClient.cs
- Mutex.cs
- PopupEventArgs.cs
- ConcurrentQueue.cs
- SqlInternalConnection.cs
- ConfigurationFileMap.cs
- RedBlackList.cs
- MetadataWorkspace.cs
- ExpressionSelection.cs
- EntitySet.cs
- ManagementOptions.cs
- ProxyWebPart.cs
- Page.cs
- LineServicesRun.cs
- GlyphRunDrawing.cs
- DBCommand.cs
- HostingEnvironmentWrapper.cs
- ColorTransformHelper.cs
- translator.cs
- JsonServiceDocumentSerializer.cs
- SystemFonts.cs
- SByteStorage.cs
- ExpressionBindings.cs
- EllipseGeometry.cs
- SrgsToken.cs
- CallbackValidatorAttribute.cs
- DataGridViewCellStyleChangedEventArgs.cs
- RewritingPass.cs
- CreateSequence.cs
- BinaryNode.cs
- SqlRowUpdatingEvent.cs
- SelectedDatesCollection.cs
- DeclaredTypeElement.cs
- EditingCommands.cs
- BuiltInExpr.cs
- EmptyElement.cs
- COM2ExtendedTypeConverter.cs
- CultureTableRecord.cs
- EntityDataReader.cs
- COM2AboutBoxPropertyDescriptor.cs
- Models.cs
- BounceEase.cs
- TextHidden.cs
- AcceleratedTokenAuthenticator.cs
- DesignerValidatorAdapter.cs
- GridItem.cs
- Latin1Encoding.cs
- RouteItem.cs
- CustomErrorCollection.cs
- ZipIOFileItemStream.cs
- DataMember.cs
- counter.cs
- SafeCryptoHandles.cs
- Parameter.cs