Package org.pdf4j.saxon.om

Examples of org.pdf4j.saxon.om.NamePool.allocate()


     */

    protected void openDocument() throws XPathException {
        NamePool pool = getPipelineConfiguration().getConfiguration().getNamePool();
        for (int i=0; i<emptyTagNames.length; i++) {
            emptyTags.add(pool.allocate("", NamespaceConstant.XHTML, emptyTagNames[i]) & NamePool.FP_MASK);
        }
        super.openDocument();
    }

    /**
 
View Full Code Here


    public void startContent() throws XPathException {
        if (foundHead) {
            foundHead = false;
            NamePool namePool = getNamePool();
            nextReceiver.startContent();
            int metaCode = namePool.allocate(headPrefix, requiredURICode, "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

            foundHead = false;
            NamePool namePool = getNamePool();
            nextReceiver.startContent();
            int metaCode = namePool.allocate(headPrefix, requiredURICode, "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

            nextReceiver.startContent();
            int metaCode = namePool.allocate(headPrefix, requiredURICode, "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

                    }
                    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

        if (inlineTagSet == null) {
            NamePool pool = getNamePool();
            inlineTagSet = new IntHashSet(50);
            formattedTagSet = new IntHashSet(10);
            for (int i=0; i<inlineTags.length; i++) {
                int nc = pool.allocate("", NamespaceConstant.XHTML, inlineTags[i]);
                inlineTagSet.add(nc);
            }
            for (int i=0; i<formattedTags.length; i++) {
                int nc = pool.allocate("", NamespaceConstant.XHTML, formattedTags[i]);
                formattedTagSet.add(nc);
View Full Code Here

            for (int i=0; i<inlineTags.length; i++) {
                int nc = pool.allocate("", NamespaceConstant.XHTML, inlineTags[i]);
                inlineTagSet.add(nc);
            }
            for (int i=0; i<formattedTags.length; i++) {
                int nc = pool.allocate("", NamespaceConstant.XHTML, formattedTags[i]);
                formattedTagSet.add(nc);
            }
        }
        int r = 0;
        int key = nameCode & NamePool.FP_MASK;
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 iter = nsDeclarations.keySet().iterator(); iter.hasNext();) {
            String nsprefix = (String)iter.next();
            String nsuri = (String)nsDeclarations.get(nsprefix);
View Full Code Here

                    }
                    String atturi = parts2[0];
                    String attlocal = parts2[1];
                    String attprefix = NameChecker.getPrefix(parts2[2]);

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

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

                } catch (QNameException err) {
                    compileError("Element name " + s + " is not a valid QName", "XTSE0280");
                    return null;
                }
                NamePool target = getNamePool();
                int nameCode = target.allocate("", uri, localName);
                nt = new NameTest(Type.ELEMENT, nameCode, getNamePool());
                pat.setNodeTest(nt);
                stripperRules.addRule(
                            pat,
                            preserve,
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.