You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,52 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="DocumentScope.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <owner current="true" primary="true">[....]</owner>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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 (Ref.Equal(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 (scope.Prefix == prefix) {
|
||||
Debug.Assert(scope.Uri != null);
|
||||
return scope.Uri;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user