Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / DocumentScope.cs / 1 / DocumentScope.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;
internal class DocumentScope {
protected NamespaceDecl scopes;
internal NamespaceDecl Scopes {
get { return this.scopes; }
}
internal NamespaceDecl AddNamespace(string prefix, string uri, string prevDefaultNsUri) {
this.scopes = new NamespaceDecl(prefix, uri, prevDefaultNsUri, this.scopes);
return this.scopes;
}
internal string ResolveAtom(string prefix) {
Debug.Assert(prefix != null && prefix.Length > 0);
for (NamespaceDecl scope = this.scopes; scope != null; scope = scope.Next) {
if (Keywords.Equals(scope.Prefix, prefix)) {
Debug.Assert(scope.Uri != null);
return scope.Uri;
}
}
return null;
}
internal string ResolveNonAtom(string prefix) {
Debug.Assert(prefix != null && prefix.Length > 0);
for (NamespaceDecl scope = this.scopes; scope != null; scope = scope.Next) {
if (Keywords.Compare(scope.Prefix, prefix)) {
Debug.Assert(scope.Uri != null);
return scope.Uri;
}
}
return null;
}
}
}
// 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;
internal class DocumentScope {
protected NamespaceDecl scopes;
internal NamespaceDecl Scopes {
get { return this.scopes; }
}
internal NamespaceDecl AddNamespace(string prefix, string uri, string prevDefaultNsUri) {
this.scopes = new NamespaceDecl(prefix, uri, prevDefaultNsUri, this.scopes);
return this.scopes;
}
internal string ResolveAtom(string prefix) {
Debug.Assert(prefix != null && prefix.Length > 0);
for (NamespaceDecl scope = this.scopes; scope != null; scope = scope.Next) {
if (Keywords.Equals(scope.Prefix, prefix)) {
Debug.Assert(scope.Uri != null);
return scope.Uri;
}
}
return null;
}
internal string ResolveNonAtom(string prefix) {
Debug.Assert(prefix != null && prefix.Length > 0);
for (NamespaceDecl scope = this.scopes; scope != null; scope = scope.Next) {
if (Keywords.Compare(scope.Prefix, prefix)) {
Debug.Assert(scope.Uri != null);
return scope.Uri;
}
}
return null;
}
}
}
// 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
- AssociationType.cs
- PerformanceCounterCategory.cs
- UriParserTemplates.cs
- RangeValueProviderWrapper.cs
- MsmqAppDomainProtocolHandler.cs
- DelegatingTypeDescriptionProvider.cs
- TableRow.cs
- CLSCompliantAttribute.cs
- RenderDataDrawingContext.cs
- ResourcePermissionBaseEntry.cs
- TrackingServices.cs
- MediaElementAutomationPeer.cs
- DataSourceProvider.cs
- PaginationProgressEventArgs.cs
- XpsSerializationManager.cs
- ToolStripItem.cs
- EntityDataSourceSelectedEventArgs.cs
- EntityDataSourceDesigner.cs
- ErrorHandler.cs
- DependencyObjectType.cs
- SafeTokenHandle.cs
- PreviewControlDesigner.cs
- DataGridItemEventArgs.cs
- DesignerVerbCollection.cs
- CloudCollection.cs
- KeyInstance.cs
- TableLayoutPanel.cs
- CodeMethodReturnStatement.cs
- SamlAttributeStatement.cs
- UnsignedPublishLicense.cs
- SchemaTableOptionalColumn.cs
- EastAsianLunisolarCalendar.cs
- SymbolMethod.cs
- VirtualizedContainerService.cs
- XmlnsDictionary.cs
- DesignerListAdapter.cs
- NavigationPropertyEmitter.cs
- COM2IDispatchConverter.cs
- InputScope.cs
- MultipleViewPatternIdentifiers.cs
- ContentType.cs
- Decorator.cs
- Cursors.cs
- WebPartVerbCollection.cs
- PathFigureCollection.cs
- EventLogPermissionEntry.cs
- VarInfo.cs
- ListMarkerLine.cs
- HttpProcessUtility.cs
- FixedBufferAttribute.cs
- EventDrivenDesigner.cs
- SoapBinding.cs
- DiagnosticTraceSource.cs
- CompModSwitches.cs
- BuildProvider.cs
- DataGridViewSortCompareEventArgs.cs
- CustomAttributeBuilder.cs
- ConfigXmlSignificantWhitespace.cs
- HttpHostedTransportConfiguration.cs
- UrlPath.cs
- ToolStripPanelRow.cs
- dataprotectionpermission.cs
- InheritanceContextChangedEventManager.cs
- LabelTarget.cs
- QuaternionKeyFrameCollection.cs
- TemplatedAdorner.cs
- WebPartManagerInternals.cs
- RegexGroupCollection.cs
- Registration.cs
- ParameterBuilder.cs
- ResXDataNode.cs
- TextRangeProviderWrapper.cs
- TableRowsCollectionEditor.cs
- WorkflowInspectionServices.cs
- DetailsViewRow.cs
- SvcMapFile.cs
- InputBinder.cs
- PreservationFileReader.cs
- WsatServiceCertificate.cs
- StyleCollection.cs
- TextContainer.cs
- DataGridViewColumn.cs
- Directory.cs
- TableRowGroup.cs
- UnsafeNativeMethods.cs
- ArrayListCollectionBase.cs
- LinkedResourceCollection.cs
- ExpressionBuilder.cs
- TrackingRecordPreFilter.cs
- HandledEventArgs.cs
- RepeatEnumerable.cs
- CertificateManager.cs
- SetterBase.cs
- TableLayoutStyleCollection.cs
- EmbeddedObject.cs
- AuthenticationServiceManager.cs
- ResourcePool.cs
- SqlMethodTransformer.cs
- contentDescriptor.cs
- FormatException.cs