Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- CaretElement.cs
- DesignerSerializerAttribute.cs
- CopyNamespacesAction.cs
- PriorityRange.cs
- TimeoutException.cs
- RectangleGeometry.cs
- AbsoluteQuery.cs
- DataSourceView.cs
- WindowsToolbarItemAsMenuItem.cs
- RelationshipWrapper.cs
- LookupBindingPropertiesAttribute.cs
- XmlSchemaComplexContent.cs
- ContentPosition.cs
- _AutoWebProxyScriptHelper.cs
- ContextActivityUtils.cs
- Utility.cs
- CursorConverter.cs
- Trace.cs
- DecimalKeyFrameCollection.cs
- TransactionException.cs
- ResourceBinder.cs
- DispatcherTimer.cs
- RightsManagementSuppressedStream.cs
- CapabilitiesSection.cs
- ObjectRef.cs
- AnnotationAuthorChangedEventArgs.cs
- WebPartDisplayModeCollection.cs
- MenuItemStyleCollection.cs
- Font.cs
- StorageMappingFragment.cs
- PageAsyncTaskManager.cs
- TargetConverter.cs
- ClientRolePrincipal.cs
- CodeStatement.cs
- PropertyEmitterBase.cs
- XmlRawWriterWrapper.cs
- EntityCollectionChangedParams.cs
- DataRecordInternal.cs
- PixelShader.cs
- OLEDB_Enum.cs
- AutoCompleteStringCollection.cs
- DisableDpiAwarenessAttribute.cs
- SetterBase.cs
- TableLayoutSettings.cs
- OleDbPropertySetGuid.cs
- PropertyOverridesDialog.cs
- NeutralResourcesLanguageAttribute.cs
- SlotInfo.cs
- EntityDataSourceDesigner.cs
- AttachmentCollection.cs
- ObjectSerializerFactory.cs
- WebPartCatalogCloseVerb.cs
- HtmlTitle.cs
- SolidColorBrush.cs
- PowerModeChangedEventArgs.cs
- Msec.cs
- PkcsUtils.cs
- DbProviderSpecificTypePropertyAttribute.cs
- QilChoice.cs
- MetadataCache.cs
- ObjectDataSourceFilteringEventArgs.cs
- DynamicField.cs
- PanelStyle.cs
- TrackingParameters.cs
- WindowsTab.cs
- SafeMemoryMappedFileHandle.cs
- Figure.cs
- ViewCellSlot.cs
- MemberBinding.cs
- XpsFontSubsetter.cs
- AxisAngleRotation3D.cs
- Publisher.cs
- CanExecuteRoutedEventArgs.cs
- CodeGroup.cs
- ListViewDeletedEventArgs.cs
- WorkflowOperationAsyncResult.cs
- OdbcTransaction.cs
- dataprotectionpermission.cs
- WebOperationContext.cs
- UInt16Converter.cs
- EditorPart.cs
- IpcChannel.cs
- FixedPageProcessor.cs
- sqlpipe.cs
- BaseParagraph.cs
- Typeface.cs
- ClientUIRequest.cs
- _Events.cs
- CollectionViewProxy.cs
- AnnotationMap.cs
- MatrixValueSerializer.cs
- DynamicPropertyHolder.cs
- NumericUpDown.cs
- ReadOnlyCollectionBuilder.cs
- __Filters.cs
- BezierSegment.cs
- XPathItem.cs
- PageThemeCodeDomTreeGenerator.cs
- ToolStripItemCollection.cs
- XhtmlConformanceSection.cs