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
- VectorCollection.cs
- MouseActionConverter.cs
- DataGridViewColumn.cs
- MethodAccessException.cs
- Facet.cs
- SqlLiftIndependentRowExpressions.cs
- UnmanagedHandle.cs
- RadialGradientBrush.cs
- CompiledELinqQueryState.cs
- ObjRef.cs
- DataServicePagingProviderWrapper.cs
- SqlInfoMessageEvent.cs
- ConfigurationCollectionAttribute.cs
- DataSetFieldSchema.cs
- ColumnMap.cs
- FastEncoderStatics.cs
- ListViewInsertEventArgs.cs
- DataGridViewBindingCompleteEventArgs.cs
- CompositeControl.cs
- DataGridViewButtonColumn.cs
- MailDefinitionBodyFileNameEditor.cs
- EvidenceTypeDescriptor.cs
- NestedContainer.cs
- GenericTypeParameterBuilder.cs
- LayoutTableCell.cs
- AdPostCacheSubstitution.cs
- EndPoint.cs
- XamlWriter.cs
- VerificationAttribute.cs
- SingleSelectRootGridEntry.cs
- MemoryFailPoint.cs
- DynamicDataRoute.cs
- ContentHostHelper.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- BrowserCapabilitiesFactoryBase.cs
- EnumConverter.cs
- KeyToListMap.cs
- XmlAnyElementAttributes.cs
- WebBrowserPermission.cs
- XmlElementAttribute.cs
- CreateBookmarkScope.cs
- MessageHeader.cs
- SQLDecimalStorage.cs
- PrintPreviewDialog.cs
- ConfigurationPropertyAttribute.cs
- TextFormatter.cs
- XsltLibrary.cs
- XmlStreamNodeWriter.cs
- SspiNegotiationTokenProviderState.cs
- DBParameter.cs
- PngBitmapDecoder.cs
- CompilerTypeWithParams.cs
- FileVersionInfo.cs
- LiteralControl.cs
- Rethrow.cs
- IdentifierCreationService.cs
- Polyline.cs
- RangeValidator.cs
- MethodRental.cs
- TranslateTransform3D.cs
- DataGridPagerStyle.cs
- HttpModuleCollection.cs
- log.cs
- SQLMembershipProvider.cs
- Triplet.cs
- ConnectionStringEditor.cs
- XmlBaseReader.cs
- UpdateTracker.cs
- SqlConnectionPoolProviderInfo.cs
- CfgParser.cs
- Adorner.cs
- DesignerActionUI.cs
- SplineKeyFrames.cs
- TrackingStringDictionary.cs
- IgnorePropertiesAttribute.cs
- EditorBrowsableAttribute.cs
- ImageDesigner.cs
- SchemaSetCompiler.cs
- WebConfigurationManager.cs
- SyndicationSerializer.cs
- ContentTextAutomationPeer.cs
- Error.cs
- ApplicationCommands.cs
- ServiceRoute.cs
- GlyphElement.cs
- WindowVisualStateTracker.cs
- ToolStripRenderer.cs
- DSASignatureDeformatter.cs
- RegistryPermission.cs
- EdmItemCollection.OcAssemblyCache.cs
- SchemaComplexType.cs
- PieceDirectory.cs
- StringDictionaryEditor.cs
- DataSourceViewSchemaConverter.cs
- ISAPIWorkerRequest.cs
- InstanceNormalEvent.cs
- RawStylusActions.cs
- WebBrowserUriTypeConverter.cs
- DataSourceProvider.cs
- SystemIcmpV6Statistics.cs