Examples of declarePrefix()


Examples of org.xml.sax.helpers.NamespaceSupport.declarePrefix()

        /**
         * Set up filter factory
         */
        NamespaceSupport namespaces = new NamespaceSupport();
        namespaces.declarePrefix("gsml", GSMLNS);
        namespaces.declarePrefix("gml", GMLNS);
        ff = new FilterFactoryImplNamespaceAware(namespaces);
       
        /**
         * Load mapped feature data access
         */       
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

        this.statEnv_ = statEnv;
    }

    public void declareNamespace(String prefix, String uri) throws XQException {
        final NamespaceBinder nsmap = statEnv_.getStaticalyKnownNamespaces();
        nsmap.declarePrefix(prefix, uri);
    }

    public String getBaseURI() {
        return statEnv_.getBaseURIString();
    }
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

    }

    protected static int countTests(final String testPath) throws XPathExpressionException {
        final XPath xpath = XPathFactory.newInstance().newXPath();
        NamespaceBinder resolver = new NamespaceBinder();
        resolver.declarePrefix(CATALONG_URI_PREFIX, CATALONG_URI);
        xpath.setNamespaceContext(resolver);
        final String count = "count(" + testPath + ")";
        XPathExpression expr = xpath.compile(count);
        final Document catalog = catalogPool.borrowObject();
        final Double d = (Double) expr.evaluate(catalog, XPathConstants.NUMBER);
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

    }

    public void invokeTest(final String testPath) throws Exception {
        XPath xpath = XPathFactory.newInstance().newXPath();
        NamespaceBinder resolver = new NamespaceBinder();
        resolver.declarePrefix(CATALONG_URI_PREFIX, CATALONG_URI);
        xpath.setNamespaceContext(resolver);

        final Document catalog = catalogPool.borrowObject();
        try {
            NodeList rs = (NodeList) xpath.evaluate(testPath, catalog, XPathConstants.NODESET);
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

                NamespaceConstructor nc = ((NamespaceConstructor) att);
                DMNamespace dmns = nc.eval(contextSeq, dynEnv);
                dmelem.addNamespace(dmns);
                String nsprefix = nc.getPrefix();
                String nsuri = nc.getValue();
                knownNamespaces.declarePrefix(nsprefix, nsuri);
            } else if(att instanceof AttributeConstructor) {
                AttributeConstructor ac = (AttributeConstructor) att;
                DMAttribute dmatt = ac.eval(contextSeq, dynEnv);
                dmelem.addAttribute(dmatt);
            } else {
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

                    hasNamespaceDecl = true;
                }
                NamespaceConstructor nc = ((NamespaceConstructor) att);
                String nsprefix = nc.getPrefix();
                String nsuri = nc.getValue();
                knownNamespaces.declarePrefix(nsprefix, nsuri);
                handler.evNamespace(nsprefix, nsuri);
            } else {
                att.evalAsEvents(handler, contextSeq, dynEnv);
            }
        }
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

    private static void generate() throws Exception {
        final Document catalog = XQTSTestBase.catalogPool.borrowObject();
        final XPath xpath = XPathFactory.newInstance().newXPath();
        NamespaceBinder resolver = new NamespaceBinder();
        resolver.declarePrefix(XQTSTestBase.CATALONG_URI_PREFIX, XQTSTestBase.CATALONG_URI);
        xpath.setNamespaceContext(resolver);
        int tcCount = 0, tcGenCount = 0;
        File testDestDir = new File(TEST_RESOURCE_DIR);
        assert (testDestDir.exists()) : testDestDir.getAbsolutePath();
        File destFile = new File(testDestDir, "TestCase.list");
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

    protected static int countTests(String testPath, Document catalog)
            throws XPathExpressionException {
        final XPath xpath = XPathFactory.newInstance().newXPath();
        NamespaceBinder resolver = new NamespaceBinder();
        resolver.declarePrefix(XQTSTestBase.CATALONG_URI_PREFIX, XQTSTestBase.CATALONG_URI);
        xpath.setNamespaceContext(resolver);
        final String count = "count(" + testPath + ")";
        XPathExpression expr = xpath.compile(count);
        final Double d = (Double) expr.evaluate(catalog, XPathConstants.NUMBER);
        return d.intValue();
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

            for(String entry : entries) {
                String[] items = entry.split("=");
                if(items.length != 2) {
                    throw new IllegalArgumentException("Illegal nsmap description: " + nsmap);
                }
                namespaces.declarePrefix(items[0], items[1]);
            }
        }
        return namespaces;
    }
View Full Code Here

Examples of xbird.util.xml.NamespaceBinder.declarePrefix()

    }

    private static void generate() throws Exception {
        final XPath xpath = XPathFactory.newInstance().newXPath();
        NamespaceBinder resolver = new NamespaceBinder();
        resolver.declarePrefix(XQTSTestBase.CATALONG_URI_PREFIX, XQTSTestBase.CATALONG_URI);
        xpath.setNamespaceContext(resolver);
        int tcCount = 0, tcGenCount = 0;
        File testDestDir = new File(TEST_RESOURCE_DIR);
        assert (testDestDir.exists()) : testDestDir.getAbsolutePath();
        File destFile = new File(testDestDir, "TestCase.list");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.