Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / TextAction.cs / 1305376 / 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 (Ref.Equal(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
- ListViewDeletedEventArgs.cs
- IsolatedStorageFile.cs
- Grant.cs
- HttpRuntime.cs
- TaskFactory.cs
- ScriptDescriptor.cs
- GridItemProviderWrapper.cs
- PermissionSetEnumerator.cs
- ObjectViewEntityCollectionData.cs
- IndicFontClient.cs
- _LocalDataStoreMgr.cs
- WebException.cs
- OverlappedAsyncResult.cs
- StrokeFIndices.cs
- Matrix3D.cs
- TreeViewBindingsEditorForm.cs
- DeclarativeConditionsCollection.cs
- CollectionBuilder.cs
- XmlCharCheckingReader.cs
- HttpWebRequestElement.cs
- CDSCollectionETWBCLProvider.cs
- DispatcherExceptionEventArgs.cs
- CodeIndexerExpression.cs
- PathFigureCollection.cs
- DefaultEventAttribute.cs
- NumericPagerField.cs
- FunctionImportMapping.cs
- HtmlElementErrorEventArgs.cs
- ContextToken.cs
- BaseConfigurationRecord.cs
- StackBuilderSink.cs
- EntityContainerEntitySetDefiningQuery.cs
- SectionInput.cs
- DisposableCollectionWrapper.cs
- Maps.cs
- ContainerTracking.cs
- BrowserInteropHelper.cs
- ServiceHttpModule.cs
- TextParagraphCache.cs
- ConnectionsZoneAutoFormat.cs
- Literal.cs
- SessionStateSection.cs
- ErrorTableItemStyle.cs
- LocationSectionRecord.cs
- Section.cs
- OutputCacheSettingsSection.cs
- WebUtil.cs
- BasicViewGenerator.cs
- SiteMap.cs
- FileEnumerator.cs
- DecoderExceptionFallback.cs
- TextParagraph.cs
- RuntimeWrappedException.cs
- PackageProperties.cs
- Sentence.cs
- ProcessThread.cs
- XmlExpressionDumper.cs
- AdapterDictionary.cs
- VoiceInfo.cs
- InheritanceUI.cs
- ChannelFactory.cs
- GroupBoxRenderer.cs
- XPathDocument.cs
- ScriptControlDescriptor.cs
- ToolBarButtonClickEvent.cs
- DataGrid.cs
- AlphabeticalEnumConverter.cs
- TransformDescriptor.cs
- SR.Designer.cs
- PostBackOptions.cs
- PagesSection.cs
- GridViewDeletedEventArgs.cs
- UnsafeNativeMethods.cs
- AssertFilter.cs
- OracleFactory.cs
- FixedFindEngine.cs
- ToolBarButton.cs
- ListItemCollection.cs
- HttpInputStream.cs
- AlternateView.cs
- ParameterToken.cs
- ResourceCollectionInfo.cs
- EventProviderWriter.cs
- FormViewInsertEventArgs.cs
- Nodes.cs
- WindowsListViewItem.cs
- StackBuilderSink.cs
- AssemblyAssociatedContentFileAttribute.cs
- TextBlock.cs
- DesignerCategoryAttribute.cs
- AnnotationResource.cs
- FileSecurity.cs
- LayoutUtils.cs
- SoapProtocolReflector.cs
- SByteStorage.cs
- SwitchAttribute.cs
- RsaSecurityKey.cs
- CommandPlan.cs
- PipelineModuleStepContainer.cs
- Help.cs