Package net.sf.saxon.om

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


                } 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


                        localName = parts[1];
                    } catch (QNameException err) {
                        compileError("Element name " + s + " is not a valid QName");
                    }
                    NamePool target = getTargetNamePool();
                    int nameCode = target.allocate("", uri, localName);
                    nt = new NameTest(Type.ELEMENT, nameCode, getNamePool());
                    pat.setNodeTest(nt);
                  stripperRules.addRule(
                        pat,
                        preserve,
View Full Code Here

                // determine if there is an alias for the namespace of the element name

                int ercode = sheet.getNamespaceAlias(elementURICode);
                if ((ercode & 0xffff) != elementURICode) {
                  elementURICode = (short)(ercode & 0xffff);
                    resultNameCode = namePool.allocate(namePool.getPrefixFromNamespaceCode(ercode),
                                                       namePool.getURIFromNamespaceCode(ercode),
                                                       getLocalPart());
                }
            }
View Full Code Here

                    if (attURIcode!=0) {  // attribute has a namespace prefix
                        int newNSCode = sheet.getNamespaceAlias(attURIcode);
                        if ((newNSCode & 0xffff) != attURIcode) {
                          attURIcode = (short)(newNSCode & 0xffff);
                            alias = namePool.allocate( namePool.getPrefixFromNamespaceCode(newNSCode),
                                                       namePool.getURIFromNamespaceCode(newNSCode),
                                                       attributeList.getLocalName(i));
                        }
                    }
View Full Code Here

            builder.open();

            int st = StandardNames.XSL_STYLESHEET;
            builder.startElement(st, -1, 0, 0);
            builder.namespace(NamespaceConstant.XSLT_CODE, 0);
            builder.attribute(pool.allocate("", "", "version"), -1, version, 0, 0);
            builder.startContent();

            int te = StandardNames.XSL_TEMPLATE;
            builder.startElement(te, -1, 0, 0);
            builder.attribute(pool.allocate("", "", "match"), -1, "/", 0, 0);
View Full Code Here

            builder.attribute(pool.allocate("", "", "version"), -1, version, 0, 0);
            builder.startContent();

            int te = StandardNames.XSL_TEMPLATE;
            builder.startElement(te, -1, 0, 0);
            builder.attribute(pool.allocate("", "", "match"), -1, "/", 0, 0);
            builder.startContent();

            builder.graftElement(this);

            builder.endElement();
View Full Code Here

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


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

            try {
                StringBuffer statement = new StringBuffer();
                statement.append("SELECT " + dbCol + " FROM " + dbTab);
View Full Code Here

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


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

            try {
                StringBuffer statement = new StringBuffer();
                statement.append("SELECT " + dbCol + " FROM " + dbTab);
                if (dbWhere!="")  {
View Full Code Here

    public NamespaceImpl(ElementImpl element, int nsCode, int index) {
        this.parent = element;
        this.nsCode = nsCode;
        NamePool pool = getNamePool();
        this.nameCode = pool.allocate("", "", pool.getPrefixFromNamespaceCode(nsCode));
        this.index = index;
    }

  /**
  * Get the namecode for this name. Not the same as the namespace code!
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

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.