Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- AutomationIdentifier.cs
- NavigationEventArgs.cs
- NavigationFailedEventArgs.cs
- Column.cs
- _Win32.cs
- DependencyPropertyAttribute.cs
- ButtonPopupAdapter.cs
- GB18030Encoding.cs
- ChangeNode.cs
- DataGridViewCellParsingEventArgs.cs
- BasicAsyncResult.cs
- CompareInfo.cs
- SdlChannelSink.cs
- BigInt.cs
- CombinedGeometry.cs
- CellConstantDomain.cs
- Int16Animation.cs
- EventRouteFactory.cs
- XmlSchemaSimpleContent.cs
- UserValidatedEventArgs.cs
- TableSectionStyle.cs
- BigInt.cs
- ResXResourceReader.cs
- VirtualizingPanel.cs
- BoundConstants.cs
- InstanceStore.cs
- Repeater.cs
- BitmapEffectDrawingContextWalker.cs
- WindowProviderWrapper.cs
- pingexception.cs
- XXXOnTypeBuilderInstantiation.cs
- QilSortKey.cs
- ProxyHelper.cs
- XPathSingletonIterator.cs
- DockPatternIdentifiers.cs
- BaseTemplateCodeDomTreeGenerator.cs
- UIAgentInitializationException.cs
- FixedSOMPageConstructor.cs
- SoapSchemaImporter.cs
- LowerCaseStringConverter.cs
- DocumentPageViewAutomationPeer.cs
- ApplicationManager.cs
- RequestCachingSection.cs
- filewebrequest.cs
- PositiveTimeSpanValidatorAttribute.cs
- securitymgrsite.cs
- SerializationStore.cs
- SchemaElementDecl.cs
- CounterSetInstance.cs
- regiisutil.cs
- DynamicValueConverter.cs
- DockProviderWrapper.cs
- WindowsSolidBrush.cs
- CodeMethodReturnStatement.cs
- ExtensionFile.cs
- XmlByteStreamReader.cs
- ArgumentReference.cs
- FormViewInsertedEventArgs.cs
- PropertyFilterAttribute.cs
- TemplateParser.cs
- LocalFileSettingsProvider.cs
- NullReferenceException.cs
- TextStore.cs
- DataViewSettingCollection.cs
- SeparatorAutomationPeer.cs
- EdmToObjectNamespaceMap.cs
- WebControlAdapter.cs
- CommonRemoteMemoryBlock.cs
- GotoExpression.cs
- RequestCachePolicyConverter.cs
- WebPartDescription.cs
- XmlArrayItemAttributes.cs
- SqlDataAdapter.cs
- DataContractJsonSerializer.cs
- DataGridCommandEventArgs.cs
- PropertyPushdownHelper.cs
- RegexNode.cs
- IfAction.cs
- Clipboard.cs
- MultipleViewProviderWrapper.cs
- WebServiceErrorEvent.cs
- ToolStripLabel.cs
- ConfigurationPermission.cs
- nulltextcontainer.cs
- RewritingValidator.cs
- Socket.cs
- ADMembershipProvider.cs
- ScrollChangedEventArgs.cs
- SqlNode.cs
- TimeSpan.cs
- XmlSchemaGroupRef.cs
- RadioButtonAutomationPeer.cs
- Size3D.cs
- SecurityContext.cs
- InstanceHandle.cs
- FlowDocument.cs
- ReadWriteObjectLock.cs
- PagerSettings.cs
- XmlSchemaType.cs
- RtfControlWordInfo.cs