Package org.exolab.castor.xml

Examples of org.exolab.castor.xml.Namespaces


        _simpleTypes      = new Hashtable();
        _elements         = new Hashtable();
        _groups           = new Hashtable();
        _importedSchemas  = new Hashtable();
        _includedSchemas  = new Vector();
        _namespaces       = new Namespaces();
        _redefineSchemas  = new Hashtable();
        _cachedincludedSchemas = new Hashtable();

        _schemaNamespace = schemaNS;
        if (_schemaNamespace == null) {
View Full Code Here


    //----------------/

    public Sax2ComponentReader(ComponentReader compReader) {
        super();
        _compReader = compReader;
        _namespaces = new Namespaces();
    } //-- Sax2ComponentReader
View Full Code Here

    public void startElement(String name, AttributeList atts)
        throws org.xml.sax.SAXException
    {
        //-- create new Namespace scope
        Namespaces nsDecls = _namespaces.createNamespaces();
        _namespaces = nsDecls;

        //-- handle namespaces
        AttributeSet attSet = processAttributeList(atts);
View Full Code Here

        }



        //-- namespace declarations
        Namespaces namespaces = schema.getNamespaces();
        Enumeration keys = namespaces.getLocalNamespacePrefixes();
        while (keys.hasMoreElements()) {
            String nsPrefix = (String)keys.nextElement();
            if (!nsPrefix.equals(schemaPrefix)) {
                String ns = namespaces.getNamespaceURI(nsPrefix);
                if (nsPrefix.length() > 0) {
                    _atts.addAttribute(XMLNS_PREFIX + nsPrefix, CDATA, ns);
                }
                else {
                    _atts.addAttribute(XMLNS_DEFAULT, CDATA, ns);
View Full Code Here

     * @param context a namespace context
     */
    public AnyNode2SAX(final AnyNode node, final Namespaces context) {
        _elements = new HashSet();
        _node     = node;
        _context  = (context == null) ? new Namespaces() : context;
    }
View Full Code Here

     * @param context a namespace context
     */
    public AnyNode2SAX2(final AnyNode node, final Namespaces context) {
        _elements = new HashSet();
        _node = node;
        _context = (context == null) ? new Namespaces() : context;
    }
View Full Code Here

    public DocumentHandlerAdapter(DocumentHandler handler) {
        if (handler == null) {
            throw new IllegalArgumentException("The argument 'handler' must not be null.");
        }
        _handler = handler;
        _namespaces = new Namespaces();
    }
View Full Code Here

        init();
    }

    private void init() {
        if (_context == null)
            _context = new Namespaces();
    }
View Full Code Here

            _nsPrefix = DEFAULT_PREFIX;
        }
        //-- find or declare namespace prefix
        else {
            _nsPrefix = null;
            Namespaces namespaces = _schema.getNamespaces();
            Enumeration enumeration = namespaces.getLocalNamespacePrefixes();
            while (enumeration.hasMoreElements()) {
                String key = (String) enumeration.nextElement();
                if (namespaces.getNamespaceURI(key).equals(Schema.DEFAULT_SCHEMA_NS)) {
                    _nsPrefix = key;
                    break;
                }
            }
            if (_nsPrefix == null) {
View Full Code Here

        }



        //-- namespace declarations
        Namespaces namespaces = schema.getNamespaces();
        Enumeration keys = namespaces.getLocalNamespacePrefixes();
        while (keys.hasMoreElements()) {
            String nsPrefix = (String)keys.nextElement();
            if (!nsPrefix.equals(schemaPrefix)) {
                String ns = namespaces.getNamespaceURI(nsPrefix);
                if (nsPrefix.length() > 0) {
                    _atts.addAttribute(XMLNS_PREFIX + nsPrefix, CDATA, ns);
                }
                else {
                    _atts.addAttribute(XMLNS_DEFAULT, CDATA, ns);
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.Namespaces

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.