Package org.apache.xerces.xni

Examples of org.apache.xerces.xni.NamespaceContext


     * [namespace attributes], except for any representing a declaration of the
     * form xmlns="", which does not declare a namespace but rather undeclares
     * the default namespace
     */
    private void printinScopeNamespaces() {
        NamespaceContext namespaceContext = fNamespaceBinder.getNamespaceContext();
        NamespaceContext temp;
        String prefix;

        printIndentTag("<inScopeNamespaces>");
        while (namespaceContext!=null) {
            temp = namespaceContext.getParentContext();
View Full Code Here


        // initialize vars
        fNamespaceSupport.reset();

        // use shared context
        NamespaceContext context = fNamespaceContext;
        while (context != null) {
            int count = context.getDeclaredPrefixCount();
            for (int i = 0; i < count; i++) {
                String prefix = context.getDeclaredPrefixAt(i);
                if (fNamespaceSupport.getURI(prefix) == null) {
                    String uri = context.getURI(prefix);
                    fNamespaceSupport.declarePrefix(prefix, uri);
                }
            }
            context = context.getParentContext();
        }

    } // reset(XMLComponentManager)
View Full Code Here

                                    System.out.println("startDocument()");
                                }
                                XMLLocator locator = HTMLScanner.this;
                                String encoding = fIANAEncoding;
                                Augmentations augs = locationAugs();
                                NamespaceContext nscontext = new NamespaceSupport();
                                XercesBridge.getInstance().XMLDocumentHandler_startDocument(fDocumentHandler, locator, encoding, nscontext, augs);
                            }
                            if (fInsertDoctype && fDocumentHandler != null) {
                                String root = HTMLElements.getElement(HTMLElements.HTML).name;
                                root = modifyName(root, fNamesElems);
View Full Code Here

                                    Class[] types = {
                                        XMLLocator.class, String.class,
                                        NamespaceContext.class, Augmentations.class
                                    };
                                    Method method = cls.getMethod("startDocument", types);
                                    NamespaceContext nscontext = new NamespaceSupport();
                                    Object[] params = {
                                        locator, encoding,
                                        nscontext, augs
                                    };
                                    method.invoke(fDocumentHandler, params);
View Full Code Here

                                    System.out.println("startDocument()");
                                }
                                XMLLocator locator = HTMLScanner.this;
                                String encoding = fIANAEncoding;
                                Augmentations augs = locationAugs();
                                NamespaceContext nscontext = new NamespaceSupport();
                                XercesBridge.getInstance().XMLDocumentHandler_startDocument(fDocumentHandler, locator, encoding, nscontext, augs);
                            }
                            if (fInsertDoctype && fDocumentHandler != null) {
                                String root = HTMLElements.getElement(HTMLElements.HTML).name;
                                root = modifyName(root, fNamesElems);
View Full Code Here

        fEmptySymbol = fSymbolTable.addSymbol("");
        fXmlSymbol = fSymbolTable.addSymbol("xml");
        fXmlnsSymbol = fSymbolTable.addSymbol("xmlns");

        // use shared context
        NamespaceContext context = fNamespaceContext;
        while (context != null) {
            int count = context.getDeclaredPrefixCount();
            for (int i = 0; i < count; i++) {
                String prefix = context.getDeclaredPrefixAt(i);
                if (fNamespaceSupport.getURI(prefix) == null) {
                    String uri = context.getURI(prefix);
                    fNamespaceSupport.declarePrefix(prefix, uri);
                }
            }
            context = context.getParentContext();
        }

    } // reset(XMLComponentManager)
View Full Code Here

     * @return the list of Step objects
     */
    public List parseRelativeSCD(String relativeSCD, boolean isIncompleteSCD) throws SCDException {
        // xmlns(p=http://example.com/schema/po)xscd(/type::p:USAddress)
        int[] currentPosition = new int[] { 0 };
        NamespaceContext nsContext = new NamespaceSupport();
        //System.out.println("Relative SCD## " + relativeSCD);
        while (currentPosition[0] < relativeSCD.length()) {
            if ("xmlns".equals(relativeSCD.substring(currentPosition[0], currentPosition[0] + 5))) { // TODO catch string out of bound exception
                currentPosition[0] = readxmlns(relativeSCD, nsContext, currentPosition[0] + 5);
            } else if ("xscd".equals(relativeSCD.substring(currentPosition[0], currentPosition[0] + 4))) { // (/type::p:USAddress) part
View Full Code Here

                                    System.out.println("startDocument()");
                                }
                                XMLLocator locator = HTMLScanner.this;
                                String encoding = fIANAEncoding;
                                Augmentations augs = locationAugs();
                                NamespaceContext nscontext = new NamespaceSupport();
                                XercesBridge.getInstance().XMLDocumentHandler_startDocument(fDocumentHandler, locator, encoding, nscontext, augs);
                            }
                            if (fInsertDoctype && fDocumentHandler != null) {
                                String root = HTMLElements.getElement(HTMLElements.HTML).name;
                                root = modifyName(root, fNamesElems);
View Full Code Here

     * [namespace attributes], except for any representing a declaration of the
     * form xmlns="", which does not declare a namespace but rather undeclares
     * the default namespace
     */
    private void printinScopeNamespaces() {
        NamespaceContext namespaceContext = fNamespaceBinder.getNamespaceContext();
        NamespaceContext temp;
        String prefix;

        printIndentTag("<inScopeNamespaces>");
        while (namespaceContext!=null) {
            temp = namespaceContext.getParentContext();
View Full Code Here

        fEmptySymbol = fSymbolTable.addSymbol("");
        fXmlSymbol = fSymbolTable.addSymbol("xml");
        fXmlnsSymbol = fSymbolTable.addSymbol("xmlns");

        // use shared context
        NamespaceContext context = fNamespaceContext;
        while (context != null) {
            int count = context.getDeclaredPrefixCount();
            for (int i = 0; i < count; i++) {
                String prefix = context.getDeclaredPrefixAt(i);
                if (fNamespaceSupport.getURI(prefix) == null) {
                    String uri = context.getURI(prefix);
                    fNamespaceSupport.declarePrefix(prefix, uri);
                }
            }
            context = context.getParentContext();
        }

    } // reset(XMLComponentManager)
View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.NamespaceContext

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.