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
- DBSqlParserTable.cs
- SharedPerformanceCounter.cs
- WhitespaceRuleReader.cs
- UInt16Converter.cs
- Overlapped.cs
- DataObjectMethodAttribute.cs
- Constants.cs
- TableLayoutStyle.cs
- SqlReferenceCollection.cs
- PersonalizationStateQuery.cs
- EntityConnection.cs
- ValueTypeFixupInfo.cs
- StringFreezingAttribute.cs
- _LocalDataStoreMgr.cs
- SafeMemoryMappedViewHandle.cs
- Assert.cs
- ReadOnlyDataSource.cs
- LoginCancelEventArgs.cs
- KeyedCollection.cs
- TreeIterator.cs
- AxisAngleRotation3D.cs
- ViewSimplifier.cs
- ButtonFieldBase.cs
- TypeReference.cs
- DependencySource.cs
- BitmapEffect.cs
- AsmxEndpointPickerExtension.cs
- RelatedImageListAttribute.cs
- RegexCompiler.cs
- WebContentFormatHelper.cs
- Baml6Assembly.cs
- BaseProcessor.cs
- HttpListenerPrefixCollection.cs
- _AuthenticationState.cs
- NullRuntimeConfig.cs
- DbDeleteCommandTree.cs
- Cursors.cs
- XpsFilter.cs
- StorageEndPropertyMapping.cs
- AttributeTable.cs
- DataServiceResponse.cs
- DbDeleteCommandTree.cs
- ObjectItemAttributeAssemblyLoader.cs
- ContentPlaceHolder.cs
- AbsoluteQuery.cs
- IOException.cs
- _WebProxyDataBuilder.cs
- XmlIlGenerator.cs
- HttpListenerException.cs
- DataControlReference.cs
- NavigateEvent.cs
- DataSourceDesigner.cs
- DynamicILGenerator.cs
- DesignerTransactionCloseEvent.cs
- CqlLexer.cs
- DataViewManagerListItemTypeDescriptor.cs
- InvalidPipelineStoreException.cs
- RelationshipSet.cs
- XmlSerializerFactory.cs
- ResourceDisplayNameAttribute.cs
- MissingMethodException.cs
- PerfService.cs
- _BufferOffsetSize.cs
- Pkcs9Attribute.cs
- ADMembershipProvider.cs
- ElementUtil.cs
- PeerToPeerException.cs
- EventRecordWrittenEventArgs.cs
- CompleteWizardStep.cs
- ListViewCommandEventArgs.cs
- NeedSkipTokenVisitor.cs
- FixedPageStructure.cs
- InvalidDataException.cs
- SiteMapHierarchicalDataSourceView.cs
- ContextBase.cs
- ColumnBinding.cs
- ComponentDesigner.cs
- WasHttpHandlersInstallComponent.cs
- CodeGenHelper.cs
- DataBinding.cs
- OneOfTypeConst.cs
- NameScopePropertyAttribute.cs
- PrintPreviewDialog.cs
- ColorTranslator.cs
- codemethodreferenceexpression.cs
- ResXResourceReader.cs
- EntityReference.cs
- X509CertificateTrustedIssuerElement.cs
- EndPoint.cs
- HtmlContainerControl.cs
- VirtualPathUtility.cs
- WinEventTracker.cs
- XhtmlBasicListAdapter.cs
- ProxyGenerator.cs
- DynamicDocumentPaginator.cs
- InputLanguageSource.cs
- DesignerWebPartChrome.cs
- TrustDriver.cs
- SuppressMessageAttribute.cs
- SHA256Cng.cs