Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataConnectionHelper.cs
- LocalValueEnumerator.cs
- SafeRightsManagementQueryHandle.cs
- CharAnimationUsingKeyFrames.cs
- CaseStatement.cs
- CustomAttributeBuilder.cs
- ConversionValidationRule.cs
- EventSinkActivityDesigner.cs
- HistoryEventArgs.cs
- EdgeProfileValidation.cs
- CardSpacePolicyElement.cs
- SerializationInfoEnumerator.cs
- SQLGuid.cs
- Panel.cs
- DrawListViewSubItemEventArgs.cs
- Listbox.cs
- AnnotationHighlightLayer.cs
- CacheVirtualItemsEvent.cs
- ExpressionNode.cs
- Overlapped.cs
- CodePageUtils.cs
- ProcessHostServerConfig.cs
- CodeDOMUtility.cs
- TextBoxRenderer.cs
- WebPartEditorOkVerb.cs
- EditorZoneDesigner.cs
- XmlIncludeAttribute.cs
- TdsParameterSetter.cs
- StrokeCollectionDefaultValueFactory.cs
- RootProfilePropertySettingsCollection.cs
- PowerStatus.cs
- XmlReaderDelegator.cs
- WindowPattern.cs
- ExpressionBindingCollection.cs
- EntityDataSourceSelectingEventArgs.cs
- StructuredProperty.cs
- ContentElementCollection.cs
- SelectionRangeConverter.cs
- WpfWebRequestHelper.cs
- WindowsProgressbar.cs
- Win32.cs
- XmlSubtreeReader.cs
- BulletedList.cs
- MatcherBuilder.cs
- QilBinary.cs
- DbXmlEnabledProviderManifest.cs
- Model3D.cs
- RangeBaseAutomationPeer.cs
- PkcsUtils.cs
- ObjectItemCollection.cs
- _ListenerRequestStream.cs
- TcpAppDomainProtocolHandler.cs
- AndCondition.cs
- DataGridViewCell.cs
- ProcessManager.cs
- UnwrappedTypesXmlSerializerManager.cs
- EntityViewGenerator.cs
- ToolStripDropTargetManager.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- RecordConverter.cs
- EditableLabelControl.cs
- _BasicClient.cs
- HtmlForm.cs
- CustomAttributeFormatException.cs
- UMPAttributes.cs
- ErrorStyle.cs
- UserControlBuildProvider.cs
- ColumnMap.cs
- MultiSelector.cs
- InputLanguageManager.cs
- NavigateEvent.cs
- OrderablePartitioner.cs
- CollectionAdapters.cs
- XPathMessageFilterTable.cs
- SamlAction.cs
- HtmlWindow.cs
- GroupBoxAutomationPeer.cs
- FieldAccessException.cs
- DynamicDiscoveryDocument.cs
- SizeAnimationClockResource.cs
- RadioButtonFlatAdapter.cs
- TransformerInfo.cs
- SimpleHandlerFactory.cs
- CommonObjectSecurity.cs
- SessionStateContainer.cs
- TextSearch.cs
- XmlDownloadManager.cs
- ElementUtil.cs
- UIElement.cs
- Error.cs
- DataGridCommandEventArgs.cs
- SharedPersonalizationStateInfo.cs
- XmlUtil.cs
- SelectionRange.cs
- Scene3D.cs
- EasingQuaternionKeyFrame.cs
- ValidationSummary.cs
- AutomationElementCollection.cs
- Cursors.cs
- HtmlFormWrapper.cs