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 / TextAction.cs / 1 / TextAction.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 TextAction : CompiledAction { private bool disableOutputEscaping; private string text; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CompileContent(compiler); } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Keywords.Equals(name, compiler.Atoms.DisableOutputEscaping)) { this.disableOutputEscaping = compiler.GetYesNo(value); } else { return false; } return true; } private void CompileContent(Compiler compiler) { if (compiler.Recurse()) { NavigatorInput input = compiler.Input; this.text = string.Empty; do { switch (input.NodeType) { case XPathNodeType.Text: case XPathNodeType.Whitespace: case XPathNodeType.SignificantWhitespace: this.text += input.Value; break; case XPathNodeType.Comment: case XPathNodeType.ProcessingInstruction: break; default: throw compiler.UnexpectedKeyword(); } } while(compiler.Advance()); compiler.ToParent(); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (processor.TextEvent(this.text, disableOutputEscaping)) { frame.Finished(); } break; default: Debug.Fail("Invalid execution state in TextAction"); 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 TextAction : CompiledAction { private bool disableOutputEscaping; private string text; internal override void Compile(Compiler compiler) { CompileAttributes(compiler); CompileContent(compiler); } internal override bool CompileAttribute(Compiler compiler) { string name = compiler.Input.LocalName; string value = compiler.Input.Value; if (Keywords.Equals(name, compiler.Atoms.DisableOutputEscaping)) { this.disableOutputEscaping = compiler.GetYesNo(value); } else { return false; } return true; } private void CompileContent(Compiler compiler) { if (compiler.Recurse()) { NavigatorInput input = compiler.Input; this.text = string.Empty; do { switch (input.NodeType) { case XPathNodeType.Text: case XPathNodeType.Whitespace: case XPathNodeType.SignificantWhitespace: this.text += input.Value; break; case XPathNodeType.Comment: case XPathNodeType.ProcessingInstruction: break; default: throw compiler.UnexpectedKeyword(); } } while(compiler.Advance()); compiler.ToParent(); } } internal override void Execute(Processor processor, ActionFrame frame) { Debug.Assert(processor != null && frame != null); switch (frame.State) { case Initialized: if (processor.TextEvent(this.text, disableOutputEscaping)) { frame.Finished(); } break; default: Debug.Fail("Invalid execution state in TextAction"); 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
- DependentTransaction.cs
- RouteValueDictionary.cs
- RegularExpressionValidator.cs
- ChannelDispatcherBase.cs
- EdmConstants.cs
- ObjectPropertyMapping.cs
- MutexSecurity.cs
- XmlSchemaAttribute.cs
- BamlWriter.cs
- TextDecorationLocationValidation.cs
- DataGrid.cs
- _HTTPDateParse.cs
- XhtmlTextWriter.cs
- NativeMethods.cs
- ObjectManager.cs
- ComponentCollection.cs
- VerificationAttribute.cs
- WebPartDisplayMode.cs
- LineGeometry.cs
- Soap11ServerProtocol.cs
- ObjectAssociationEndMapping.cs
- SecUtil.cs
- ReachPageContentSerializerAsync.cs
- ContextStaticAttribute.cs
- Operand.cs
- PropertyGeneratedEventArgs.cs
- GetImportFileNameRequest.cs
- XmlSerializableWriter.cs
- LastQueryOperator.cs
- ControllableStoryboardAction.cs
- backend.cs
- DnsEndpointIdentity.cs
- ProfileManager.cs
- BindingCompleteEventArgs.cs
- ClientSideProviderDescription.cs
- KnownTypesProvider.cs
- OptionalRstParameters.cs
- IfAction.cs
- X509Extension.cs
- InvalidOperationException.cs
- NavigationEventArgs.cs
- CacheVirtualItemsEvent.cs
- ToolboxComponentsCreatingEventArgs.cs
- MultipartIdentifier.cs
- WaitingCursor.cs
- Utils.cs
- ConnectionsZone.cs
- _TLSstream.cs
- LifetimeServices.cs
- OperandQuery.cs
- IgnoreSection.cs
- DetailsViewCommandEventArgs.cs
- counter.cs
- DataGridTable.cs
- ToolBar.cs
- Main.cs
- HtmlInputImage.cs
- NameValuePair.cs
- LogArchiveSnapshot.cs
- LinkDescriptor.cs
- GrammarBuilder.cs
- CompilerHelpers.cs
- MailAddress.cs
- TickBar.cs
- AudioBase.cs
- DataGridTextBoxColumn.cs
- DocumentPaginator.cs
- ConfigXmlCDataSection.cs
- DifferencingCollection.cs
- SubpageParagraph.cs
- BasicAsyncResult.cs
- HybridObjectCache.cs
- PageSetupDialog.cs
- StringSorter.cs
- LayoutEditorPart.cs
- EntityDataSourceMemberPath.cs
- UInt64Converter.cs
- FileDialogCustomPlace.cs
- TranslateTransform.cs
- ComponentCommands.cs
- WaitHandleCannotBeOpenedException.cs
- X509IssuerSerialKeyIdentifierClause.cs
- ZipIOCentralDirectoryFileHeader.cs
- TraceUtils.cs
- PeerNearMe.cs
- OuterGlowBitmapEffect.cs
- ApplicationFileParser.cs
- SafeRightsManagementEnvironmentHandle.cs
- StringValueSerializer.cs
- WebConfigurationFileMap.cs
- TextPattern.cs
- SocketInformation.cs
- SHA512.cs
- PngBitmapDecoder.cs
- JapaneseCalendar.cs
- InlinedAggregationOperator.cs
- StorageScalarPropertyMapping.cs
- NotifyCollectionChangedEventArgs.cs
- DataContractSerializerOperationBehavior.cs
- XpsFixedDocumentSequenceReaderWriter.cs