Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PartitionResolver.cs
- Encoder.cs
- HttpTransportManager.cs
- EventLogEntry.cs
- SqlUtil.cs
- DefinitionBase.cs
- Dispatcher.cs
- AppliedDeviceFiltersEditor.cs
- CommandEventArgs.cs
- OracleDataReader.cs
- ScriptManager.cs
- DataBoundControlAdapter.cs
- Part.cs
- DispatchWrapper.cs
- EDesignUtil.cs
- BaseDataBoundControl.cs
- DoubleKeyFrameCollection.cs
- NavigatingCancelEventArgs.cs
- AspNetHostingPermission.cs
- SecurityHeaderLayout.cs
- ScriptComponentDescriptor.cs
- LayoutInformation.cs
- SecurityChannelFactory.cs
- PeerTransportSecuritySettings.cs
- StrongNameUtility.cs
- SqlNodeAnnotations.cs
- DefaultHttpHandler.cs
- SafeWaitHandle.cs
- ExtendedPropertyDescriptor.cs
- DataGridHeaderBorder.cs
- ExplicitDiscriminatorMap.cs
- UnicodeEncoding.cs
- AnnotationAuthorChangedEventArgs.cs
- WrapPanel.cs
- IPHostEntry.cs
- elementinformation.cs
- FieldNameLookup.cs
- EmbeddedMailObjectsCollection.cs
- EventWaitHandleSecurity.cs
- DataTableMapping.cs
- ExtendedPropertyInfo.cs
- WebScriptEndpoint.cs
- OleDbEnumerator.cs
- XDRSchema.cs
- CleanUpVirtualizedItemEventArgs.cs
- InteropExecutor.cs
- PropertyDescriptor.cs
- EventPrivateKey.cs
- securitycriticaldataClass.cs
- DataRecord.cs
- SimpleWorkerRequest.cs
- ListDataHelper.cs
- ADMembershipUser.cs
- StringStorage.cs
- Ray3DHitTestResult.cs
- Font.cs
- TriggerAction.cs
- IISMapPath.cs
- DataGridViewColumnCollectionEditor.cs
- Brushes.cs
- SelectionHighlightInfo.cs
- TypeGenericEnumerableViewSchema.cs
- LogEntryDeserializer.cs
- HttpCookiesSection.cs
- PropertySourceInfo.cs
- BindingRestrictions.cs
- PropertyPath.cs
- DataPagerFieldCollection.cs
- HGlobalSafeHandle.cs
- LinqToSqlWrapper.cs
- UIElementCollection.cs
- XPathChildIterator.cs
- sqlstateclientmanager.cs
- HotSpotCollection.cs
- webproxy.cs
- PeerNameRecord.cs
- DesignerTransaction.cs
- XmlSchemaRedefine.cs
- DesignerCommandAdapter.cs
- ReferentialConstraint.cs
- ObfuscationAttribute.cs
- ScrollProviderWrapper.cs
- ExtensionSimplifierMarkupObject.cs
- PenLineJoinValidation.cs
- HebrewCalendar.cs
- CompilerError.cs
- DataSourceSelectArguments.cs
- TempEnvironment.cs
- DataContractAttribute.cs
- PriorityQueue.cs
- ContentFileHelper.cs
- ResourceDisplayNameAttribute.cs
- ContentTextAutomationPeer.cs
- SecurityDocument.cs
- FilterException.cs
- JoinElimination.cs
- DeadCharTextComposition.cs
- TypeConverterHelper.cs
- ParseChildrenAsPropertiesAttribute.cs
- ResourcePool.cs