internal void Init(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next)
 {
     this.prefix           = prefix;
     this.nsUri            = nsUri;
     this.prevDefaultNsUri = prevDefaultNsUri;
     this.next             = next;
 }
Exemple #2
0
 internal void Init(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next)
 {
     _prefix = prefix;
     _nsUri = nsUri;
     _prevDefaultNsUri = prevDefaultNsUri;
     _next = next;
 }
Exemple #3
0
 internal void Init(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next)
 {
     _prefix           = prefix;
     _nsUri            = nsUri;
     _prevDefaultNsUri = prevDefaultNsUri;
     _next             = next;
 }
Exemple #4
0
        internal void PopScope()
        {
            OutputScope elementScope = (OutputScope)_elementScopesStack.Pop();

            Debug.Assert(elementScope != null); // We adding rootElementScope to garantee this

            for (NamespaceDecl scope = elementScope.Scopes; scope != null; scope = scope.Next)
            {
                _defaultNS = scope.PrevDefaultNsUri;
            }
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        internal void PopScope()
        {
            Debug.Assert(_scopeStack != null, "Push/Pop disbalance");
            if (_scopeStack == null)
            {
                return;
            }

            for (NamespaceDecl scope = _scopeStack.Scopes; scope != null; scope = scope.Next)
            {
                _defaultNS = scope.PrevDefaultNsUri;
            }

            _scopeStack = _scopeStack.Parent;
        }
Exemple #7
0
        internal bool FindPrefix(string urn, out string prefix)
        {
            Debug.Assert(urn != null);

            for (NamespaceDecl scope = this.scopes; scope != null; scope = scope.Next)
            {
                if (Ref.Equal(scope.Uri, urn) &&
                    scope.Prefix != null &&
                    scope.Prefix.Length > 0)
                {
                    prefix = scope.Prefix;
                    return(true);
                }
            }

            prefix = string.Empty;
            return(false);
        }
Exemple #8
0
 internal NamespaceDecl AddNamespace(string prefix, string uri, string prevDefaultNsUri) {
     this.scopes = new NamespaceDecl(prefix, uri, prevDefaultNsUri, this.scopes);
     return this.scopes;
 }
Exemple #9
0
 internal NamespaceDecl AddNamespace(string prefix, string uri, string prevDefaultNsUri)
 {
     this.scopes = new NamespaceDecl(prefix, uri, prevDefaultNsUri, this.scopes);
     return(this.scopes);
 }
 internal void Init(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next) {
     this.prefix           = prefix;
     this.nsUri            = nsUri;
     this.prevDefaultNsUri = prevDefaultNsUri;
     this.next             = next;
 }
 internal NamespaceDecl(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next) {
     Init(prefix, nsUri, prevDefaultNsUri, next);
 }
 internal NamespaceDecl(string prefix, string nsUri, string prevDefaultNsUri, NamespaceDecl next)
 {
     Init(prefix, nsUri, prevDefaultNsUri, next);
 }