Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / UseAttributeSetsAction.cs / 1 / UseAttributeSetsAction.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; using System.Collections; internal class UseAttributeSetsAction : CompiledAction { private XmlQualifiedName[] useAttributeSets; private string useString; private const int ProcessingSets = 2; internal XmlQualifiedName[] UsedSets { get { return this.useAttributeSets; } } internal override void Compile(Compiler compiler) { Debug.Assert(Keywords.Equals(compiler.Input.LocalName, compiler.Atoms.UseAttributeSets)); this.useString = compiler.Input.Value; Debug.Assert(this.useAttributeSets == null); if (this.useString.Length == 0) { // Split creates empty node is spliting empty string this.useAttributeSets = new XmlQualifiedName[0]; return; } string[] qnames = XmlConvert.SplitString(this.useString); try { this.useAttributeSets = new XmlQualifiedName[qnames.Length]; { for (int i = 0; i < qnames.Length; i++) { this.useAttributeSets[i] = compiler.CreateXPathQName(qnames[i]); } } } catch (XsltException) { if (!compiler.ForwardCompatibility) { // Rethrow the exception if we're not in forwards-compatible mode throw; } // Ignore the whole list in forwards-compatible mode this.useAttributeSets = new XmlQualifiedName[0]; } } internal override void Execute(Processor processor, ActionFrame frame) { switch(frame.State) { case Initialized: frame.Counter = 0; frame.State = ProcessingSets; goto case ProcessingSets; case ProcessingSets: if (frame.Counter < this.useAttributeSets.Length) { AttributeSetAction action = processor.RootAction.GetAttributeSet(this.useAttributeSets[frame.Counter]); frame.IncrementCounter(); processor.PushActionFrame(action, frame.NodeSet); } else { frame.Finished(); } break; default: Debug.Fail("Invalid Container action execution state"); 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; using System.Collections; internal class UseAttributeSetsAction : CompiledAction { private XmlQualifiedName[] useAttributeSets; private string useString; private const int ProcessingSets = 2; internal XmlQualifiedName[] UsedSets { get { return this.useAttributeSets; } } internal override void Compile(Compiler compiler) { Debug.Assert(Keywords.Equals(compiler.Input.LocalName, compiler.Atoms.UseAttributeSets)); this.useString = compiler.Input.Value; Debug.Assert(this.useAttributeSets == null); if (this.useString.Length == 0) { // Split creates empty node is spliting empty string this.useAttributeSets = new XmlQualifiedName[0]; return; } string[] qnames = XmlConvert.SplitString(this.useString); try { this.useAttributeSets = new XmlQualifiedName[qnames.Length]; { for (int i = 0; i < qnames.Length; i++) { this.useAttributeSets[i] = compiler.CreateXPathQName(qnames[i]); } } } catch (XsltException) { if (!compiler.ForwardCompatibility) { // Rethrow the exception if we're not in forwards-compatible mode throw; } // Ignore the whole list in forwards-compatible mode this.useAttributeSets = new XmlQualifiedName[0]; } } internal override void Execute(Processor processor, ActionFrame frame) { switch(frame.State) { case Initialized: frame.Counter = 0; frame.State = ProcessingSets; goto case ProcessingSets; case ProcessingSets: if (frame.Counter < this.useAttributeSets.Length) { AttributeSetAction action = processor.RootAction.GetAttributeSet(this.useAttributeSets[frame.Counter]); frame.IncrementCounter(); processor.PushActionFrame(action, frame.NodeSet); } else { frame.Finished(); } break; default: Debug.Fail("Invalid Container action execution state"); 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
- PauseStoryboard.cs
- StatusStrip.cs
- AbstractSvcMapFileLoader.cs
- LinkedResource.cs
- OrderedDictionary.cs
- RenderingBiasValidation.cs
- HostingPreferredMapPath.cs
- CaseExpr.cs
- TreeNodeCollection.cs
- COM2ExtendedTypeConverter.cs
- MenuCommand.cs
- SplayTreeNode.cs
- TCPClient.cs
- SafeRegistryHandle.cs
- AuthenticatedStream.cs
- AssociationSet.cs
- ProcessHost.cs
- AsyncOperationManager.cs
- DataRecordObjectView.cs
- WebPartDisplayMode.cs
- SortExpressionBuilder.cs
- ELinqQueryState.cs
- LinqDataSourceStatusEventArgs.cs
- ActiveDocumentEvent.cs
- SplitterEvent.cs
- ObjectDataSourceMethodEditor.cs
- SqlDataSourceSummaryPanel.cs
- XmlNodeList.cs
- LayoutExceptionEventArgs.cs
- AddInServer.cs
- Size3D.cs
- FixedTextView.cs
- EventBookmark.cs
- HttpRequestCacheValidator.cs
- DataControlFieldCollection.cs
- ArrayEditor.cs
- XmlSchemaAppInfo.cs
- ProviderSettingsCollection.cs
- ClientSettingsStore.cs
- ProjectionCamera.cs
- CodeDOMUtility.cs
- SoapEnvelopeProcessingElement.cs
- AttachedAnnotationChangedEventArgs.cs
- ProfileModule.cs
- Soap12FormatExtensions.cs
- ICspAsymmetricAlgorithm.cs
- HandlerBase.cs
- StaticExtensionConverter.cs
- ScriptMethodAttribute.cs
- AnnotationHelper.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- SQLInt32Storage.cs
- BulletChrome.cs
- BackgroundFormatInfo.cs
- GridViewSortEventArgs.cs
- RuntimeConfig.cs
- CrossSiteScriptingValidation.cs
- SHA256.cs
- BlockUIContainer.cs
- BitmapMetadataBlob.cs
- SmiEventStream.cs
- NetworkInterface.cs
- UnhandledExceptionEventArgs.cs
- RadialGradientBrush.cs
- SchemaImporterExtension.cs
- ComponentCommands.cs
- TemporaryBitmapFile.cs
- GridPattern.cs
- MergeExecutor.cs
- NeutralResourcesLanguageAttribute.cs
- sqlinternaltransaction.cs
- ScriptMethodAttribute.cs
- XmlTypeMapping.cs
- UiaCoreTypesApi.cs
- AttributedMetaModel.cs
- ZipIOLocalFileDataDescriptor.cs
- CodeAttributeDeclaration.cs
- X509CertificateInitiatorClientCredential.cs
- RelationshipConverter.cs
- MenuItemBindingCollection.cs
- MasterPage.cs
- SpellerError.cs
- CorrelationInitializer.cs
- XmlNavigatorStack.cs
- CodeCastExpression.cs
- UITypeEditor.cs
- SuppressIldasmAttribute.cs
- InternalConfigConfigurationFactory.cs
- FileDialogCustomPlace.cs
- securitymgrsite.cs
- ObjectPersistData.cs
- HostedElements.cs
- SudsCommon.cs
- CorrelationHandle.cs
- CellIdBoolean.cs
- SessionStateSection.cs
- QuarticEase.cs
- FormViewInsertedEventArgs.cs
- DataBindEngine.cs
- SizeConverter.cs