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
- indexingfiltermarshaler.cs
- DataMemberConverter.cs
- VisualTreeUtils.cs
- AbandonedMutexException.cs
- SoapHeaderException.cs
- Compiler.cs
- ScriptControlDescriptor.cs
- InfoCardServiceInstallComponent.cs
- MimeTypeMapper.cs
- TextEditorThreadLocalStore.cs
- ViewPort3D.cs
- BitmapMetadata.cs
- TextDecoration.cs
- FormatConvertedBitmap.cs
- SrgsGrammar.cs
- GeneralTransform2DTo3DTo2D.cs
- Range.cs
- MouseEventArgs.cs
- MatrixKeyFrameCollection.cs
- SchemaLookupTable.cs
- CounterCreationData.cs
- InfoCardConstants.cs
- filewebresponse.cs
- RewritingProcessor.cs
- Empty.cs
- CompilerState.cs
- EncryptedData.cs
- RootBrowserWindowProxy.cs
- DeflateStream.cs
- LinqDataSourceView.cs
- HtmlAnchor.cs
- ListView.cs
- CompressEmulationStream.cs
- DictionaryEntry.cs
- FixUp.cs
- X509Utils.cs
- EncodingDataItem.cs
- Normalization.cs
- MenuAdapter.cs
- BindingListCollectionView.cs
- CollectionViewGroupInternal.cs
- ScriptControl.cs
- WebBrowser.cs
- OrderingInfo.cs
- SystemResourceHost.cs
- LinearGradientBrush.cs
- StringExpressionSet.cs
- XamlTreeBuilderBamlRecordWriter.cs
- SchemaNamespaceManager.cs
- ISAPIWorkerRequest.cs
- BookmarkInfo.cs
- DeviceContext.cs
- FontStretch.cs
- TextBoxView.cs
- HostingMessageProperty.cs
- RenderOptions.cs
- Operator.cs
- ExpandableObjectConverter.cs
- RoleManagerModule.cs
- CommandManager.cs
- WindowsEditBoxRange.cs
- SoapEnumAttribute.cs
- AttachedAnnotation.cs
- DesignRelation.cs
- CommandConverter.cs
- FileSystemEventArgs.cs
- SByteConverter.cs
- PropertyConverter.cs
- MatchingStyle.cs
- DocumentsTrace.cs
- HttpListenerRequestUriBuilder.cs
- ServiceModelPerformanceCounters.cs
- SupportsEventValidationAttribute.cs
- TableColumn.cs
- WebBrowser.cs
- XmlSchemaDocumentation.cs
- StringResourceManager.cs
- NotSupportedException.cs
- KeyValueSerializer.cs
- DirectoryObjectSecurity.cs
- PartitionedDataSource.cs
- CustomBindingElement.cs
- MarshalByRefObject.cs
- SchemaLookupTable.cs
- TextWriter.cs
- AttributedMetaModel.cs
- _SecureChannel.cs
- _AutoWebProxyScriptHelper.cs
- OlePropertyStructs.cs
- LexicalChunk.cs
- StandardToolWindows.cs
- QilUnary.cs
- NegationPusher.cs
- QilUnary.cs
- Span.cs
- DynamicILGenerator.cs
- TimelineGroup.cs
- CounterSetInstanceCounterDataSet.cs
- ScrollBarRenderer.cs
- SHA1Cng.cs