亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? namespacehelper.java

?? 主要的怎么樣結(jié)合java 和 javascript!
?? JAVA
字號:
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is Rhino code, released * May 6, 1999. * * The Initial Developer of the Original Code is Netscape * Communications Corporation.  Portions created by Netscape are * Copyright (C) 1997-2000 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): * Milen Nankov * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the * provisions of the GPL are applicable instead of those above. * If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use your * version of this file under the NPL, indicate your decision by * deleting the provisions above and replace them with the notice * and other provisions required by the GPL.  If you do not delete * the provisions above, a recipient may use your version of this * file under either the NPL or the GPL. */package org.mozilla.javascript.xmlimpl;import java.util.*;import org.apache.xmlbeans.XmlCursor;import org.mozilla.javascript.*;class NamespaceHelper{    private XMLLibImpl lib;    private final Map prefixToURI = new HashMap();    private final Map uriToPrefix = new HashMap();    // A set of URIs that are used without explicit namespace declaration in scope.    private final Set undeclared = new HashSet();    private NamespaceHelper(XMLLibImpl lib)    {        this.lib = lib;        // Insert the default namespace        prefixToURI.put("", "");        Set prefixes = new HashSet();        prefixes.add("");        uriToPrefix.put("", prefixes);    }    /**     * Declared a new namespace     *     * @param prefix     * @param uri     * @param declarations     */    private void declareNamespace(String prefix, String uri, ObjArray declarations)    {        Set prefixes = (Set)uriToPrefix.get(uri);        if(prefixes == null)        {            prefixes = new HashSet();            uriToPrefix.put(uri, prefixes);        }        if(!prefixes.contains(prefix))        {            String oldURI = (String)prefixToURI.get(prefix);            // Add the new mapping            prefixes.add(prefix);            prefixToURI.put(prefix, uri);            if(declarations != null)                declarations.add(new Namespace(lib, prefix, uri));            if(oldURI != null)            {                // Update the existing mapping                prefixes = (Set)uriToPrefix.get(oldURI);                prefixes.remove(prefix);            }        }    }    /**     * Updates the internal state of this NamespaceHelper to reflect the     * existance of the XML token pointed to by the cursor.     */    private void processName(XmlCursor cursor, ObjArray declarations)    {        javax.xml.namespace.QName qname = cursor.getName();        String uri = qname.getNamespaceURI();        Set prefixes = (Set)uriToPrefix.get(uri);        if(prefixes == null || prefixes.size() == 0)        {            undeclared.add(uri);            if(declarations != null)                declarations.add(new Namespace(lib, uri));        }    }    /**     * Updates the internal state of this NamespaceHelper with the     * namespace information of the element pointed to by the cursor.     */    private void update(XmlCursor cursor, ObjArray declarations)    {        // Process the Namespace declarations        cursor.push();        while(cursor.toNextToken().isAnyAttr())        {            if(cursor.isNamespace())            {                javax.xml.namespace.QName name = cursor.getName();                String prefix = name.getLocalPart();                String uri = name.getNamespaceURI();                declareNamespace(prefix, uri, declarations);            }        }        cursor.pop();        // Process the element        processName(cursor, declarations);        // Process the attributes        cursor.push();        boolean hasNext = cursor.toFirstAttribute();        while(hasNext)        {            processName(cursor, declarations);            hasNext = cursor.toNextAttribute();        }        cursor.pop();    }    /**     * @return Object[] array of Namespace objects in scope at the cursor.     */    public static Object[] inScopeNamespaces(XMLLibImpl lib, XmlCursor cursor)    {        ObjArray namespaces = new ObjArray();        NamespaceHelper helper = new NamespaceHelper(lib);        cursor.push();        int depth = 0;        while(cursor.hasPrevToken())        {            if(cursor.isContainer())            {                cursor.push();                depth++;            }            cursor.toParent();        }        for(int i = 0; i < depth; i++)        {            cursor.pop();            helper.update(cursor, null);        }        Iterator i = helper.prefixToURI.entrySet().iterator();        while(i.hasNext())        {            Map.Entry entry = (Map.Entry)i.next();            Namespace ns = new Namespace(lib, (String)entry.getKey(),                                            (String)entry.getValue());            namespaces.add(ns);        }        i = helper.undeclared.iterator();        while(i.hasNext())        {            Namespace ns = new Namespace(lib, (String)i.next());            namespaces.add(ns);        }        cursor.pop();        return namespaces.toArray();    }    static Namespace getNamespace(XMLLibImpl lib, XmlCursor cursor,                                  Object[] inScopeNamespaces)    {        String uri;        String prefix;        if (cursor.isProcinst()) {            uri = "";            prefix = "";        } else {            javax.xml.namespace.QName qname = cursor.getName();            uri = qname.getNamespaceURI();            prefix = qname.getPrefix();        }        if (inScopeNamespaces == null)            return new Namespace(lib, prefix, uri);        Namespace result = null;        for (int i = 0; i != inScopeNamespaces.length; ++i) {            Namespace ns = (Namespace)inScopeNamespaces[i];            if(ns == null) continue;            String nsURI = ns.uri();            if(nsURI.equals(uri))            {                if(prefix.equals(ns.prefix()))                {                    result = ns;                    break;                }                if(result == null ||                   (result.prefix() == null &&                    ns.prefix() != null))                    result = ns;            }        }        if(result == null)            result = new Namespace(lib, prefix, uri);        return result;    }    /**     * @return List of Namespace objects that are declared in the container pointed to by the cursor.     */    public static Object[] namespaceDeclarations(XMLLibImpl lib, XmlCursor cursor)    {        ObjArray declarations = new ObjArray();        NamespaceHelper helper = new NamespaceHelper(lib);        cursor.push();        int depth = 0;        while(cursor.hasPrevToken())        {            if(cursor.isContainer())            {                cursor.push();                depth++;            }            cursor.toParent();        }        for(int i = 0; i < depth - 1; i++)        {            cursor.pop();            helper.update(cursor, null);        }        if(depth > 0)        {            cursor.pop();            helper.update(cursor, declarations);        }        cursor.pop();        return declarations.toArray();    }    /**     * @return Prefix to URI map of all namespaces in scope at the cursor.     */    public static Map getAllNamespaces(XMLLibImpl lib, XmlCursor cursor)    {        NamespaceHelper helper = new NamespaceHelper(lib);        cursor.push();        int depth = 0;        while(cursor.hasPrevToken())        {            if(cursor.isContainer())            {                cursor.push();                depth++;            }            cursor.toParent();        }        for(int i = 0; i < depth; i++)        {            cursor.pop();            helper.update(cursor, null);        }        cursor.pop();        return helper.prefixToURI;    }    public static void getNamespaces(XmlCursor cursor, Map prefixToURI)    {        cursor.push();        while(cursor.toNextToken().isAnyAttr())        {            if(cursor.isNamespace())            {                javax.xml.namespace.QName name = cursor.getName();                String prefix = name.getLocalPart();                String uri = name.getNamespaceURI();                prefixToURI.put(prefix, uri);            }        }        cursor.pop();    }    public static void removeNamespace(XmlCursor cursor, String prefix)    {        cursor.push();        while(cursor.toNextToken().isAnyAttr())        {            if(cursor.isNamespace())            {                javax.xml.namespace.QName name = cursor.getName();                if(name.getLocalPart().equals(prefix))                {                    cursor.removeXml();                    break;                }            }        }        cursor.pop();    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色综合天天久久综合精品| 欧美精品免费视频| 欧美视频日韩视频| 国产精品青草综合久久久久99| 日本欧美大码aⅴ在线播放| 国产一区二区视频在线| 欧美视频在线一区二区三区 | av高清不卡在线| 日韩欧美专区在线| 午夜精品国产更新| 色综合久久88色综合天天 | 日韩午夜在线影院| 亚洲综合成人在线| 91影视在线播放| 国产欧美一区二区精品久导航 | 日韩精品一二三| 在线观看日韩电影| 亚洲精品成人少妇| 99精品一区二区三区| 国产欧美日韩不卡免费| 激情深爱一区二区| 日韩欧美一区二区在线视频| 日韩高清不卡在线| 欧美一区二区三区爱爱| 日本aⅴ免费视频一区二区三区 | 午夜精品久久久久久久久| 97se亚洲国产综合自在线| 中文av一区二区| 成人高清视频在线| 久久精品视频一区二区| 激情五月播播久久久精品| 欧美精品一区二区久久婷婷| 国产在线精品一区二区| 久久人人爽爽爽人久久久| 国产一区欧美日韩| 国产欧美va欧美不卡在线| 成人黄色国产精品网站大全在线免费观看 | 欧美日韩你懂的| 亚洲成人一二三| 欧美精品成人一区二区三区四区| 天堂成人国产精品一区| 欧美第一区第二区| 国产精品一色哟哟哟| 国产精品免费网站在线观看| 99久久综合精品| 亚洲一区二区成人在线观看| 91麻豆精品国产91久久久资源速度| 日日夜夜精品视频天天综合网| 欧美猛男gaygay网站| 老汉av免费一区二区三区| 国产欧美日韩精品一区| 91免费国产在线| 男男gaygay亚洲| 欧美成人一级视频| 成人午夜av影视| 一区二区三区精品在线观看| 91麻豆精品国产91久久久久| 紧缚奴在线一区二区三区| 国产三级一区二区| 色欧美日韩亚洲| 视频在线观看一区| 欧美国产日韩精品免费观看| 日本高清免费不卡视频| 日本成人中文字幕在线视频| 欧美一区二区三区四区视频| 成人美女在线视频| 日欧美一区二区| 国产精品久久久久久久久久久免费看 | 2024国产精品视频| 色综合久久久网| 久久69国产一区二区蜜臀| 亚洲欧美色综合| 久久免费国产精品| 精品视频一区二区三区免费| 国产不卡高清在线观看视频| 亚洲成人福利片| 国产精品女主播av| 日韩欧美亚洲国产另类| 91蜜桃视频在线| 久久99精品视频| 午夜视频一区二区| 亚洲视频香蕉人妖| 久久久www成人免费毛片麻豆| 欧美三级电影在线观看| av电影在线不卡| 国产精品99久久久久久久女警| 亚洲电影一级片| 亚洲综合免费观看高清完整版在线 | 91精品国产91久久综合桃花| 东方欧美亚洲色图在线| 亚洲一区二区欧美激情| 国产精品福利av| 国产欧美精品国产国产专区| 日韩精品中文字幕一区| 欧美三级蜜桃2在线观看| 91麻豆蜜桃一区二区三区| 狠狠色狠狠色综合日日91app| 婷婷中文字幕一区三区| 亚洲一区二区三区四区五区黄| 26uuu精品一区二区| 欧美另类videos死尸| 色菇凉天天综合网| 91丨九色丨国产丨porny| 国产高清亚洲一区| 日韩制服丝袜av| 日韩vs国产vs欧美| 一片黄亚洲嫩模| 亚洲视频一二区| 一区二区三区在线观看网站| 亚洲色图20p| 一区二区久久久久久| 国产精品福利影院| 国产精品久久久久久久午夜片 | 日韩欧美国产小视频| 日韩午夜激情视频| 欧美一级日韩不卡播放免费| 日韩精品一区二区三区中文精品| 欧美一区二区三区啪啪| 日韩欧美久久一区| 久久欧美一区二区| 国产精品美日韩| 亚洲精品乱码久久久久久久久| 一区二区三区在线观看欧美| 亚洲综合清纯丝袜自拍| 日本美女一区二区| 国产精品亚洲а∨天堂免在线| 国产不卡一区视频| 91年精品国产| 91精品国产欧美一区二区| 欧美电影精品一区二区| 中文子幕无线码一区tr| 亚洲欧美视频在线观看视频| 水蜜桃久久夜色精品一区的特点 | 91欧美激情一区二区三区成人| 欧洲在线/亚洲| 欧美一二三四在线| 国产精品毛片无遮挡高清| 亚洲另类中文字| 蜜桃视频第一区免费观看| 成人性视频免费网站| 欧美影视一区二区三区| 精品少妇一区二区三区在线播放| 国产无一区二区| 一卡二卡三卡日韩欧美| 久久电影网电视剧免费观看| 99久久综合精品| 欧美成人精品1314www| 国产精品大尺度| 蜜臀av一区二区在线免费观看| 成人午夜视频在线观看| 欧美日本在线播放| 国产精品美女久久久久久久| 午夜激情一区二区三区| 国产精品 日产精品 欧美精品| 色婷婷综合久久久久中文 | 成人精品电影在线观看| 欧美日韩国产首页| 国产精品网站导航| 久久99精品国产.久久久久久| 91高清视频免费看| 久久久99久久| 日本不卡在线视频| 91视频com| 国产日韩三级在线| 麻豆精品国产传媒mv男同| 一道本成人在线| 中文字幕第一页久久| 美女视频黄 久久| 欧美午夜精品久久久久久孕妇| 欧美国产精品久久| 另类小说综合欧美亚洲| 欧美日韩精品欧美日韩精品| 国产精品久久福利| 国产老肥熟一区二区三区| 91精品国产综合久久久久久久 | 亚洲男人的天堂在线aⅴ视频| 久久99精品久久久久婷婷| 欧美三级视频在线观看| 亚洲视频一二区| 成人精品视频一区二区三区 | 欧美电影免费提供在线观看| 午夜精彩视频在线观看不卡| 色婷婷久久综合| 1024亚洲合集| www.成人在线| 国产欧美日韩在线| 国产福利电影一区二区三区| 欧美α欧美αv大片| 青青草国产成人av片免费| 欧美日韩久久一区| 亚洲一级电影视频| 欧美主播一区二区三区美女| 亚洲综合免费观看高清完整版在线| 99久久婷婷国产综合精品| 国产精品热久久久久夜色精品三区| 高清不卡在线观看| 国产精品美女一区二区在线观看| 成人小视频免费观看| 18欧美乱大交hd1984| 91久久精品午夜一区二区|