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
- InsufficientMemoryException.cs
- MasterPage.cs
- DirectoryInfo.cs
- DocumentPageHost.cs
- StringBuilder.cs
- KnownBoxes.cs
- DynamicValueConverter.cs
- ImageFormat.cs
- WebResourceAttribute.cs
- InkPresenterAutomationPeer.cs
- AutoSizeToolBoxItem.cs
- CmsInterop.cs
- BitmapEffectInput.cs
- UrlPath.cs
- EventSetter.cs
- MdImport.cs
- IPAddress.cs
- XamlFigureLengthSerializer.cs
- CompiledRegexRunner.cs
- WebResourceUtil.cs
- NameObjectCollectionBase.cs
- UriTemplateDispatchFormatter.cs
- TcpClientCredentialType.cs
- BackgroundWorker.cs
- SettingsPropertyWrongTypeException.cs
- CustomValidator.cs
- ThreadSafeList.cs
- NotCondition.cs
- DataConnectionHelper.cs
- SpStreamWrapper.cs
- PrinterUnitConvert.cs
- VideoDrawing.cs
- DurationConverter.cs
- RootBrowserWindowProxy.cs
- RelOps.cs
- VariableQuery.cs
- OleDbConnection.cs
- ThaiBuddhistCalendar.cs
- AccessedThroughPropertyAttribute.cs
- ValueQuery.cs
- TextTreeNode.cs
- TypeToken.cs
- UpdateCompiler.cs
- ColorBlend.cs
- WebBrowserNavigatedEventHandler.cs
- SatelliteContractVersionAttribute.cs
- Point3DConverter.cs
- DateRangeEvent.cs
- PeerApplication.cs
- TextBoxAutomationPeer.cs
- HMACSHA256.cs
- MaskDescriptor.cs
- LookupNode.cs
- HttpPostClientProtocol.cs
- XmlIgnoreAttribute.cs
- AssertFilter.cs
- FormViewCommandEventArgs.cs
- RTLAwareMessageBox.cs
- Queue.cs
- GeneralTransform3DCollection.cs
- DataGridViewBand.cs
- TimeEnumHelper.cs
- ExpandSegment.cs
- FixedSOMImage.cs
- ArrangedElementCollection.cs
- TypeToken.cs
- Formatter.cs
- AspProxy.cs
- CodeIterationStatement.cs
- TranslateTransform.cs
- HttpException.cs
- CaseStatementProjectedSlot.cs
- InvokeHandlers.cs
- UrlPath.cs
- BuildProviderAppliesToAttribute.cs
- EntitySetBaseCollection.cs
- DataGridViewCellStyleChangedEventArgs.cs
- ForeignKeyConstraint.cs
- ControlBuilderAttribute.cs
- HtmlListAdapter.cs
- ListBoxItemWrapperAutomationPeer.cs
- PeerApplicationLaunchInfo.cs
- IntersectQueryOperator.cs
- BitmapSourceSafeMILHandle.cs
- SchemaInfo.cs
- MemoryPressure.cs
- ExtentKey.cs
- DataGridItemCollection.cs
- DllNotFoundException.cs
- CollectionViewProxy.cs
- Rotation3D.cs
- TextMetrics.cs
- SyndicationCategory.cs
- WorkflowRuntimeBehavior.cs
- DATA_BLOB.cs
- LogSwitch.cs
- PriorityQueue.cs
- BoolExpr.cs
- NoneExcludedImageIndexConverter.cs
- DynamicPropertyHolder.cs