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
- DataGridViewSelectedColumnCollection.cs
- Lasso.cs
- Parameter.cs
- AnimationStorage.cs
- OutgoingWebRequestContext.cs
- CapabilitiesState.cs
- IsolatedStorageFileStream.cs
- MenuItemAutomationPeer.cs
- FrameworkPropertyMetadata.cs
- SingleStorage.cs
- DataGridCellsPresenter.cs
- BitStream.cs
- Publisher.cs
- XmlNodeChangedEventArgs.cs
- PlainXmlDeserializer.cs
- BitmapEffectInputConnector.cs
- ContextMenu.cs
- StylusPointCollection.cs
- ByteStreamGeometryContext.cs
- Stack.cs
- XmlSchemaInferenceException.cs
- RawStylusActions.cs
- DocumentApplicationJournalEntry.cs
- ProjectionPath.cs
- BinaryWriter.cs
- ArglessEventHandlerProxy.cs
- KeyValueConfigurationCollection.cs
- ColumnMap.cs
- PathGradientBrush.cs
- SqlStream.cs
- DocumentPageTextView.cs
- IdentityReference.cs
- XmlUrlResolver.cs
- XmlSchemaSet.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- MessagePartDescription.cs
- ClientFormsAuthenticationCredentials.cs
- DataGridViewCell.cs
- WindowsGraphicsCacheManager.cs
- SQLDateTimeStorage.cs
- ValidationResult.cs
- BamlBinaryReader.cs
- FloaterBaseParagraph.cs
- returneventsaver.cs
- ServiceKnownTypeAttribute.cs
- PlanCompilerUtil.cs
- Parallel.cs
- SettingsPropertyValue.cs
- DataObjectMethodAttribute.cs
- PlatformCulture.cs
- QilInvokeLateBound.cs
- RepeaterItem.cs
- WebUtil.cs
- OracleBFile.cs
- StreamResourceInfo.cs
- TemplateComponentConnector.cs
- TypeProvider.cs
- SQLInt32Storage.cs
- Int32CAMarshaler.cs
- Trace.cs
- OuterGlowBitmapEffect.cs
- TTSEngineProxy.cs
- Stackframe.cs
- MachineKeyValidationConverter.cs
- PrefixHandle.cs
- ResumeStoryboard.cs
- TreeSet.cs
- HtmlTernaryTree.cs
- CodeThrowExceptionStatement.cs
- QueryTask.cs
- CompiledQueryCacheEntry.cs
- _CacheStreams.cs
- PolicyException.cs
- EditCommandColumn.cs
- PeerNearMe.cs
- RotateTransform3D.cs
- ToolStripOverflow.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- CodeParameterDeclarationExpression.cs
- AnimationClock.cs
- path.cs
- HealthMonitoringSection.cs
- Configuration.cs
- Rfc2898DeriveBytes.cs
- DependencyPropertyAttribute.cs
- QilNode.cs
- Rect3D.cs
- ObjectManager.cs
- NamespaceEmitter.cs
- BaseParagraph.cs
- SmtpSection.cs
- XPathPatternBuilder.cs
- BoundField.cs
- ValueQuery.cs
- NumberSubstitution.cs
- ToolBarPanel.cs
- ConfigurationPropertyAttribute.cs
- PerformanceCounterNameAttribute.cs
- FunctionQuery.cs
- GradientStop.cs