Package net.sf.saxon.om

Examples of net.sf.saxon.om.NamePool.allocate()


                    }
                    if (uriCode == -1) {
                        return null;
                    }
                    String uri = pool.getURIFromURICode((short)uriCode);
                    int typefp = pool.allocate(parts[0], uri, parts[1]) & NamePool.FP_MASK;
                    return env.getConfiguration().getSchemaType(typefp);
                } catch (QNameException e) {
                    throw new XPathException(e.getMessage());
                }
            }
View Full Code Here


     *          module resolver is not required.
     */

    public StreamSource[] resolve(String moduleURI, String baseURI, String[] locations) throws XPathException {
        NamePool pool = testCase.getNamePool();
        int moduleNC = pool.allocate("", "http://www.w3.org/2005/02/query-test-XQTSCatalog", "module");
        int namespaceNC = pool.allocate("", "", "namespace");
        AxisIterator iter = testCase.iterateAxis(Axis.CHILD, new NameTest(Type.ELEMENT, moduleNC, pool));
        List catalogLocations = new ArrayList(5);
        while (true) {
            NodeInfo m = (NodeInfo)iter.next();
View Full Code Here

     */

    public StreamSource[] resolve(String moduleURI, String baseURI, String[] locations) throws XPathException {
        NamePool pool = testCase.getNamePool();
        int moduleNC = pool.allocate("", "http://www.w3.org/2005/02/query-test-XQTSCatalog", "module");
        int namespaceNC = pool.allocate("", "", "namespace");
        AxisIterator iter = testCase.iterateAxis(Axis.CHILD, new NameTest(Type.ELEMENT, moduleNC, pool));
        List catalogLocations = new ArrayList(5);
        while (true) {
            NodeInfo m = (NodeInfo)iter.next();
            if (m == null) break;
View Full Code Here

        String uri = elparts2[0];
        String local = elparts2[1];
        String prefix = NameChecker.getPrefix(elparts2[2]);

        NamePool namePool = config.getNamePool();
        int nameCode = namePool.allocate(prefix, uri, local);

        receiver.startElement(nameCode, StandardNames.XS_UNTYPED, 0, 0);
        for (Iterator<String> iter = nsDeclarations.keySet().iterator(); iter.hasNext();) {
            String nsprefix = iter.next();
            String nsuri = nsDeclarations.get(nsprefix);
View Full Code Here

                    // Note, DOM gives no guarantee that the prefix and URI are actually consistent. For example,
                    // it's possible programmatically to construct attribute nodes that have a namespace URI but
                    // no prefix. We don't attempt to deal with such situations: garbage in, garbage out.

                    int attCode = namePool.allocate(attprefix, atturi, attlocal);

                    receiver.attribute(attCode, StandardNames.XS_UNTYPED_ATOMIC, att.getValue(), 0, 0);
                }
            }
        }
View Full Code Here

            String dbTab = arguments[TABLE].evaluateAsString(context).toString();
            String dbWhere = arguments[WHERE].evaluateAsString(context).toString();


            NamePool pool = controller.getNamePool();
            int rowCode = pool.allocate("", "", rowTag);
            int colCode = pool.allocate("", "", colTag);

            PreparedStatement ps = null;
            ResultSet rs = null;
            XPathException de = null;
View Full Code Here

            String dbWhere = arguments[WHERE].evaluateAsString(context).toString();


            NamePool pool = controller.getNamePool();
            int rowCode = pool.allocate("", "", rowTag);
            int colCode = pool.allocate("", "", colTag);

            PreparedStatement ps = null;
            ResultSet rs = null;
            XPathException de = null;
View Full Code Here

        if (foundHead) {
            foundHead = false;
            NamePool namePool = getNamePool();
            nextReceiver.startContent();
            String uri = (requiredURICode == 0 ? "" : NamespaceConstant.XHTML);
            int metaCode = namePool.allocate("", uri, "meta");
            nextReceiver.startElement(metaCode, StandardNames.XS_UNTYPED, 0, 0);
            int httpEquivCode = namePool.allocate("", "", "http-equiv");
            nextReceiver.attribute(httpEquivCode, StandardNames.XS_UNTYPED_ATOMIC, "Content-Type", 0, 0);
            int contentCode = namePool.allocate("", "", "content");
            nextReceiver.attribute(contentCode, StandardNames.XS_UNTYPED_ATOMIC, mediaType + "; charset=" + encoding, 0, 0);
View Full Code Here

            NamePool namePool = getNamePool();
            nextReceiver.startContent();
            String uri = (requiredURICode == 0 ? "" : NamespaceConstant.XHTML);
            int metaCode = namePool.allocate("", uri, "meta");
            nextReceiver.startElement(metaCode, StandardNames.XS_UNTYPED, 0, 0);
            int httpEquivCode = namePool.allocate("", "", "http-equiv");
            nextReceiver.attribute(httpEquivCode, StandardNames.XS_UNTYPED_ATOMIC, "Content-Type", 0, 0);
            int contentCode = namePool.allocate("", "", "content");
            nextReceiver.attribute(contentCode, StandardNames.XS_UNTYPED_ATOMIC, mediaType + "; charset=" + encoding, 0, 0);
            nextReceiver.startContent();
            droppingMetaTags = level;
View Full Code Here

            String uri = (requiredURICode == 0 ? "" : NamespaceConstant.XHTML);
            int metaCode = namePool.allocate("", uri, "meta");
            nextReceiver.startElement(metaCode, StandardNames.XS_UNTYPED, 0, 0);
            int httpEquivCode = namePool.allocate("", "", "http-equiv");
            nextReceiver.attribute(httpEquivCode, StandardNames.XS_UNTYPED_ATOMIC, "Content-Type", 0, 0);
            int contentCode = namePool.allocate("", "", "content");
            nextReceiver.attribute(contentCode, StandardNames.XS_UNTYPED_ATOMIC, mediaType + "; charset=" + encoding, 0, 0);
            nextReceiver.startContent();
            droppingMetaTags = level;
            seekingHead = false;
            attributes = new AttributeCollectionImpl(getConfiguration());
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.