Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / UseAttributeSetsAction.cs / 1305376 / 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(Ref.Equal(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
- UrlPath.cs
- FusionWrap.cs
- PartitionerQueryOperator.cs
- Errors.cs
- BaseServiceProvider.cs
- RadioButtonBaseAdapter.cs
- TTSEngineProxy.cs
- MobileControlsSectionHelper.cs
- MultiTrigger.cs
- QuadraticEase.cs
- SuppressMessageAttribute.cs
- Path.cs
- EpmHelper.cs
- RawStylusInput.cs
- OleServicesContext.cs
- LexicalChunk.cs
- TypeDependencyAttribute.cs
- Guid.cs
- WindowsPrincipal.cs
- ZipIOBlockManager.cs
- XmlSchemaValidator.cs
- ArraySortHelper.cs
- DataGridViewComboBoxEditingControl.cs
- ParallelRangeManager.cs
- HtmlInputButton.cs
- MatrixConverter.cs
- ListCollectionView.cs
- ToolStripDropDownDesigner.cs
- DataGridItem.cs
- SamlSubject.cs
- TableLayout.cs
- CompareValidator.cs
- FilePrompt.cs
- ThreadStaticAttribute.cs
- ValueCollectionParameterReader.cs
- RequestStatusBarUpdateEventArgs.cs
- XmlDataSource.cs
- Int16Animation.cs
- BinHexDecoder.cs
- StorageComplexPropertyMapping.cs
- WindowsRebar.cs
- TextRangeEditLists.cs
- KeyValuePair.cs
- IIS7UserPrincipal.cs
- PerformanceCounterPermissionAttribute.cs
- SystemUdpStatistics.cs
- PageAsyncTaskManager.cs
- TextEncodedRawTextWriter.cs
- Compilation.cs
- QueuePropertyVariants.cs
- _HeaderInfoTable.cs
- ElementProxy.cs
- StringPropertyBuilder.cs
- Helpers.cs
- TypedRowGenerator.cs
- SmiEventSink_DeferedProcessing.cs
- WebEventTraceProvider.cs
- VerificationAttribute.cs
- TabletCollection.cs
- ObjectTag.cs
- AutomationPattern.cs
- QueryStringParameter.cs
- DesignerForm.cs
- ApplicationFileParser.cs
- Simplifier.cs
- MenuItemAutomationPeer.cs
- TrackingServices.cs
- ProxyWebPart.cs
- mediaclock.cs
- BitmapFrameDecode.cs
- Range.cs
- PersistencePipeline.cs
- ColumnHeaderCollectionEditor.cs
- RC2CryptoServiceProvider.cs
- MachineKeySection.cs
- ToolTipAutomationPeer.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- PropertyDescriptorComparer.cs
- RelationshipDetailsRow.cs
- CodeValidator.cs
- WSSecurityTokenSerializer.cs
- TargetControlTypeAttribute.cs
- InputBinding.cs
- XmlnsPrefixAttribute.cs
- PropertyOverridesTypeEditor.cs
- AppSettingsReader.cs
- DrawingCollection.cs
- DataTableMappingCollection.cs
- D3DImage.cs
- DispatcherProcessingDisabled.cs
- WasNotInstalledException.cs
- ParagraphResult.cs
- SQLGuid.cs
- SequentialOutput.cs
- InstanceDescriptor.cs
- IndexedEnumerable.cs
- MultiplexingFormatMapping.cs
- DataGridViewCellEventArgs.cs
- Misc.cs
- DesignerActionService.cs