Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- TargetFrameworkAttribute.cs
- SHA384.cs
- ProtocolsConfigurationEntry.cs
- SplineQuaternionKeyFrame.cs
- XmlWriter.cs
- JsonSerializer.cs
- Label.cs
- InProcStateClientManager.cs
- TextDecorations.cs
- QuadraticBezierSegment.cs
- EntityProviderFactory.cs
- WindowsNonControl.cs
- Vector3D.cs
- SqlException.cs
- ErrorHandler.cs
- Graph.cs
- FormViewModeEventArgs.cs
- AddInContractAttribute.cs
- UIElementCollection.cs
- ToolboxDataAttribute.cs
- StorageAssociationTypeMapping.cs
- ColorPalette.cs
- DataService.cs
- HttpCacheParams.cs
- HWStack.cs
- RequestDescription.cs
- CachedBitmap.cs
- XmlUtil.cs
- MILUtilities.cs
- FeatureSupport.cs
- SqlOuterApplyReducer.cs
- DataPagerCommandEventArgs.cs
- FormsAuthenticationModule.cs
- Encoding.cs
- DiscoveryClientReferences.cs
- GenerateHelper.cs
- PaintValueEventArgs.cs
- SamlConditions.cs
- JournalNavigationScope.cs
- InternalReceiveMessage.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- MissingMemberException.cs
- OrderingQueryOperator.cs
- StylusEditingBehavior.cs
- HttpApplicationFactory.cs
- StrokeNodeOperations2.cs
- CompoundFileStreamReference.cs
- FileDetails.cs
- CapabilitiesState.cs
- TypeUtil.cs
- SortQuery.cs
- Cursors.cs
- RectAnimation.cs
- PropertyConverter.cs
- AsyncOperationManager.cs
- ValidatorCollection.cs
- ipaddressinformationcollection.cs
- ExpandSegment.cs
- DmlSqlGenerator.cs
- XhtmlTextWriter.cs
- RootBuilder.cs
- VectorKeyFrameCollection.cs
- EntityViewGenerator.cs
- FormattedText.cs
- KnownColorTable.cs
- CharConverter.cs
- ColorConverter.cs
- DbDataReader.cs
- clipboard.cs
- BidOverLoads.cs
- XhtmlBasicValidationSummaryAdapter.cs
- EventEntry.cs
- Region.cs
- AvTraceFormat.cs
- UnsafeNativeMethods.cs
- VisualBasicSettingsHandler.cs
- OutputCacheSection.cs
- OutputScope.cs
- BufferAllocator.cs
- ImagingCache.cs
- HashMembershipCondition.cs
- StringTraceRecord.cs
- LineServicesCallbacks.cs
- TypeSystem.cs
- PropertyMap.cs
- Attributes.cs
- PageBuildProvider.cs
- CheckableControlBaseAdapter.cs
- SessionStateItemCollection.cs
- DropSource.cs
- BinaryReader.cs
- CachedRequestParams.cs
- DrawingGroupDrawingContext.cs
- NamespaceList.cs
- M3DUtil.cs
- ReachNamespaceInfo.cs
- DataReaderContainer.cs
- DoubleCollection.cs
- RegexReplacement.cs
- UserNameSecurityTokenAuthenticator.cs