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
- NetDispatcherFaultException.cs
- Variant.cs
- SerialPort.cs
- RoleManagerSection.cs
- Validator.cs
- WebPartConnectionsDisconnectVerb.cs
- Size3D.cs
- ViewBox.cs
- TreeNodeStyleCollection.cs
- MultiTrigger.cs
- FormDesigner.cs
- StyleBamlRecordReader.cs
- RunClient.cs
- EventManager.cs
- ScalarOps.cs
- ReflectionUtil.cs
- WebServiceHandler.cs
- DataGridViewCellPaintingEventArgs.cs
- Flowchart.cs
- ElapsedEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- DesignerActionKeyboardBehavior.cs
- XsdBuildProvider.cs
- BaseTemplateBuildProvider.cs
- TypeLibConverter.cs
- DictionaryEntry.cs
- PreApplicationStartMethodAttribute.cs
- OutputCacheSection.cs
- TextServicesPropertyRanges.cs
- SQLConvert.cs
- ObjectComplexPropertyMapping.cs
- PartBasedPackageProperties.cs
- ElementsClipboardData.cs
- ControlCollection.cs
- StatusBarItem.cs
- AmbiguousMatchException.cs
- GridLength.cs
- KeyboardNavigation.cs
- TypefaceMap.cs
- TextFormatterImp.cs
- Trigger.cs
- SplitterEvent.cs
- NeedSkipTokenVisitor.cs
- ClientUtils.cs
- DiscoveryViaBehavior.cs
- WebPartAuthorizationEventArgs.cs
- ToolStripDropDown.cs
- AttachmentService.cs
- HttpClientCertificate.cs
- Size.cs
- ServicePointManager.cs
- HebrewNumber.cs
- UdpConstants.cs
- SessionEndingEventArgs.cs
- TextOnlyOutput.cs
- DateTimeFormatInfoScanner.cs
- MessageSmuggler.cs
- MetabaseServerConfig.cs
- SqlConnectionStringBuilder.cs
- WebPartDesigner.cs
- ListViewDesigner.cs
- FullTextLine.cs
- WebDisplayNameAttribute.cs
- InfoCardProofToken.cs
- EventSinkActivity.cs
- StatusBarPanel.cs
- ServiceModelActivationSectionGroup.cs
- PermissionSetTriple.cs
- ProjectionQueryOptionExpression.cs
- OrthographicCamera.cs
- OleDbSchemaGuid.cs
- RepeaterItemEventArgs.cs
- SqlRowUpdatingEvent.cs
- HttpException.cs
- ExpressionPrefixAttribute.cs
- ZipArchive.cs
- DbXmlEnabledProviderManifest.cs
- RootBrowserWindowProxy.cs
- FreezableDefaultValueFactory.cs
- InstanceHandleReference.cs
- SafeSerializationManager.cs
- SessionPageStateSection.cs
- IIS7WorkerRequest.cs
- RepeatButton.cs
- MouseGestureConverter.cs
- BufferedGraphicsContext.cs
- ContainerFilterService.cs
- RenderCapability.cs
- MetadataProperty.cs
- TextPattern.cs
- ImageSource.cs
- OrderedDictionaryStateHelper.cs
- sqlser.cs
- ErrorFormatter.cs
- BasicBrowserDialog.cs
- Quaternion.cs
- AppSettingsExpressionBuilder.cs
- SerializationInfoEnumerator.cs
- MissingManifestResourceException.cs
- OdbcConnectionHandle.cs