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
- CodeLabeledStatement.cs
- EntityContainerEmitter.cs
- InternalCache.cs
- SqlDesignerDataSourceView.cs
- Decorator.cs
- GridView.cs
- RTLAwareMessageBox.cs
- TreeNodeBindingCollection.cs
- Tag.cs
- DbDataSourceEnumerator.cs
- StorageEndPropertyMapping.cs
- UnauthorizedWebPart.cs
- SqlDuplicator.cs
- MissingManifestResourceException.cs
- BindToObject.cs
- ISSmlParser.cs
- HostProtectionPermission.cs
- RelationshipWrapper.cs
- EmbeddedMailObjectsCollection.cs
- HitTestParameters3D.cs
- ObjectDataSourceMethodEventArgs.cs
- ChannelCredentials.cs
- TypeDescriptor.cs
- GridViewRowPresenter.cs
- CollectionConverter.cs
- ObjectStateEntry.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- IntSecurity.cs
- GradientBrush.cs
- AppDomainResourcePerfCounters.cs
- DataExpression.cs
- AnonymousIdentificationSection.cs
- UnsafeNativeMethodsPenimc.cs
- Int32Collection.cs
- TagNameToTypeMapper.cs
- SignatureToken.cs
- ZipIOLocalFileDataDescriptor.cs
- DetailsViewModeEventArgs.cs
- SerializationTrace.cs
- XmlExpressionDumper.cs
- PopupControlService.cs
- HtmlControl.cs
- SchemaTableColumn.cs
- ClientTargetSection.cs
- GridViewSelectEventArgs.cs
- SortAction.cs
- EventMappingSettings.cs
- PaperSource.cs
- EntityConnection.cs
- Message.cs
- TextReturnReader.cs
- MenuStrip.cs
- SoundPlayer.cs
- TimeSpanConverter.cs
- AudioBase.cs
- StructuralComparisons.cs
- DeclarationUpdate.cs
- ParseElementCollection.cs
- ParseHttpDate.cs
- CompilerInfo.cs
- PropertyTabChangedEvent.cs
- DataServiceKeyAttribute.cs
- DocumentViewerBase.cs
- DefaultPropertiesToSend.cs
- SoapSchemaImporter.cs
- listitem.cs
- DefaultExpression.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SHA512Managed.cs
- MimeObjectFactory.cs
- TimeoutHelper.cs
- TextRangeEditTables.cs
- Oid.cs
- IconHelper.cs
- WebPartZoneCollection.cs
- SmiSettersStream.cs
- RTLAwareMessageBox.cs
- SettingsPropertyValueCollection.cs
- ParentQuery.cs
- FilterElement.cs
- EntryPointNotFoundException.cs
- DataGridColumnCollectionEditor.cs
- ProxyElement.cs
- DataGridCaption.cs
- WSDualHttpBinding.cs
- AdobeCFFWrapper.cs
- Function.cs
- AsyncCompletedEventArgs.cs
- DataComponentGenerator.cs
- UpdateException.cs
- QilPatternVisitor.cs
- NetSectionGroup.cs
- SecureConversationVersion.cs
- FontWeights.cs
- Stylus.cs
- TrustManager.cs
- TextCompositionManager.cs
- Attributes.cs
- OperationResponse.cs
- TemplateBamlTreeBuilder.cs