Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- Table.cs
- FusionWrap.cs
- ImageCreator.cs
- SnapLine.cs
- BaseDataList.cs
- ChameleonKey.cs
- SaveRecipientRequest.cs
- ProjectedSlot.cs
- DetailsViewPageEventArgs.cs
- TreeIterator.cs
- ChannelManager.cs
- DataGridViewComboBoxColumn.cs
- ColumnWidthChangedEvent.cs
- SizeLimitedCache.cs
- XPathNodeIterator.cs
- ExpressionBuilder.cs
- ScriptIgnoreAttribute.cs
- Latin1Encoding.cs
- DbTransaction.cs
- PlatformCulture.cs
- SynchronizingStream.cs
- GlyphsSerializer.cs
- ClientTarget.cs
- EpmSyndicationContentSerializer.cs
- _HeaderInfoTable.cs
- ManifestResourceInfo.cs
- CheckoutException.cs
- ToolZone.cs
- DrawingVisualDrawingContext.cs
- Application.cs
- QuaternionAnimation.cs
- MetabaseSettingsIis7.cs
- ZipQueryOperator.cs
- TextLineResult.cs
- PeerObject.cs
- SqlGenericUtil.cs
- mda.cs
- DirtyTextRange.cs
- ScrollEvent.cs
- SchemaMapping.cs
- xmlNames.cs
- ClientTargetCollection.cs
- RegexCharClass.cs
- UIElementParaClient.cs
- ToolStripOverflowButton.cs
- ProjectionAnalyzer.cs
- _NTAuthentication.cs
- BaseAddressPrefixFilterElement.cs
- CriticalExceptions.cs
- HighlightComponent.cs
- NameNode.cs
- DataTransferEventArgs.cs
- OutputCacheProfile.cs
- DataReceivedEventArgs.cs
- safelinkcollection.cs
- AuthorizationPolicyTypeElement.cs
- StyleSelector.cs
- Error.cs
- DataGridViewComboBoxCell.cs
- DesigntimeLicenseContext.cs
- ChildTable.cs
- ConfigurationLocationCollection.cs
- SoapInteropTypes.cs
- IDQuery.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- SearchForVirtualItemEventArgs.cs
- SqlBooleanMismatchVisitor.cs
- WorkflowMarkupSerializer.cs
- Setter.cs
- AppearanceEditorPart.cs
- DetailsViewUpdatedEventArgs.cs
- XPathNodePointer.cs
- KeyToListMap.cs
- RowToFieldTransformer.cs
- StructuredTypeEmitter.cs
- CodeAttributeDeclarationCollection.cs
- InvokeHandlers.cs
- SqlRowUpdatedEvent.cs
- ConnectionManagementElement.cs
- Baml2006ReaderSettings.cs
- ReaderOutput.cs
- WindowsSlider.cs
- StyleSheetComponentEditor.cs
- AdRotator.cs
- StateBag.cs
- DockPatternIdentifiers.cs
- TextRunCacheImp.cs
- _OSSOCK.cs
- OleDbStruct.cs
- EntityDataSourceSelectingEventArgs.cs
- RuntimeComponentFilter.cs
- CompileXomlTask.cs
- DropDownHolder.cs
- HttpStreamFormatter.cs
- ToolStripPanelRow.cs
- WebPartTracker.cs
- RegistryPermission.cs
- BufferModeSettings.cs
- CodeValidator.cs
- AccessorTable.cs