Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ExceptionHandlersDesigner.cs
- DataServiceRequestOfT.cs
- ComplexObject.cs
- LockCookie.cs
- ControlValuePropertyAttribute.cs
- EmptyStringExpandableObjectConverter.cs
- ObjectSet.cs
- ConfigurationManagerHelper.cs
- OleDbParameterCollection.cs
- ConvertEvent.cs
- FrameworkTextComposition.cs
- ListViewAutomationPeer.cs
- TargetParameterCountException.cs
- ItemsPanelTemplate.cs
- XmlSerializerObjectSerializer.cs
- SoapInteropTypes.cs
- PropertyGridEditorPart.cs
- ParserExtension.cs
- InternalSafeNativeMethods.cs
- Console.cs
- DependsOnAttribute.cs
- ByteConverter.cs
- SendingRequestEventArgs.cs
- DataGridViewCellStyleConverter.cs
- RightsManagementPermission.cs
- ALinqExpressionVisitor.cs
- XmlEnumAttribute.cs
- ExecutionEngineException.cs
- UniqueIdentifierService.cs
- TemporaryBitmapFile.cs
- LoginName.cs
- Symbol.cs
- XmlSchemaDatatype.cs
- QueryCacheManager.cs
- PrintEvent.cs
- DataTableReaderListener.cs
- IconHelper.cs
- RenameRuleObjectDialog.cs
- MsmqAppDomainProtocolHandler.cs
- UnicodeEncoding.cs
- DataSourceView.cs
- FreeFormDesigner.cs
- PeerEndPoint.cs
- Block.cs
- AstNode.cs
- DataGridViewRowHeaderCell.cs
- IisTraceWebEventProvider.cs
- AggregateException.cs
- DynamicResourceExtensionConverter.cs
- XamlVector3DCollectionSerializer.cs
- NotifyIcon.cs
- OptimalTextSource.cs
- ImageSource.cs
- DataPagerField.cs
- OdbcConnectionFactory.cs
- Subtree.cs
- UnicodeEncoding.cs
- RotateTransform3D.cs
- AsyncOperationContext.cs
- FrameworkContextData.cs
- WebPartCollection.cs
- BitmapSourceSafeMILHandle.cs
- WrapperEqualityComparer.cs
- TextParagraphView.cs
- IIS7WorkerRequest.cs
- EventMemberCodeDomSerializer.cs
- BrowserCapabilitiesFactory.cs
- MergablePropertyAttribute.cs
- TypeLibConverter.cs
- XmlSchemaImporter.cs
- ProtocolsConfigurationEntry.cs
- OleDbReferenceCollection.cs
- FloaterParagraph.cs
- SwitchAttribute.cs
- TreeNode.cs
- TerminateDesigner.cs
- Double.cs
- DataRowComparer.cs
- StrokeIntersection.cs
- MarshalDirectiveException.cs
- MasterPageParser.cs
- RoutedEventValueSerializer.cs
- DocumentViewer.cs
- SoapCodeExporter.cs
- InputLangChangeRequestEvent.cs
- RadioButtonAutomationPeer.cs
- basecomparevalidator.cs
- EncryptedPackage.cs
- BindingSourceDesigner.cs
- SqlDependency.cs
- XPathDocumentIterator.cs
- UriTemplateEquivalenceComparer.cs
- WebSysDefaultValueAttribute.cs
- FixedPage.cs
- GroupQuery.cs
- FrameworkPropertyMetadata.cs
- IdleTimeoutMonitor.cs
- IdentityModelStringsVersion1.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- SchemaElementLookUpTable.cs