Package org.pdf4j.saxon.value

Examples of org.pdf4j.saxon.value.AnyURIValue


        NamespaceResolver resolver = new InscopeNamespaceResolver(element);
        String uri = resolver.getURIForPrefix(prefix, true);
        if (uri == null) {
            return null;
        }
        return new AnyURIValue(uri);
    }
View Full Code Here


        }
        String s = node.getBaseURI();
        if (s == null) {
            return null;
        }
        return new AnyURIValue(s);
    }
View Full Code Here

         */

        public Item next() throws XPathException {
            if (enumerator.MoveNext()) {
                Uri u = (Uri)enumerator.get_Current();
                current = new AnyURIValue(u.ToString());
                position++;
                return current;
            } else {
                position = -1;
                return null;
View Full Code Here

                    err.setErrorCode("FODC0004");
                    err.setXPathContext(context);
                    throw err;
                }
                if (finalStable) {
                    return new AnyURIValue(uri);
                } else {
                    // stability not required, bypass the document pool and URI resolver
                    return context.getConfiguration().buildDocument(new StreamSource(uri));
                }
            }
View Full Code Here

    public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {
        String baseURI = visitor.getStaticContext().getBaseURI();
        if (baseURI == null) {
            return Literal.makeEmptySequence();
        }
        return Literal.makeLiteral(new AnyURIValue(baseURI));
    }
View Full Code Here

        }

        Platform platform = Configuration.getPlatform();
        try {
            URI resolved = platform.makeAbsolute(relative,  base);
            return new AnyURIValue(resolved.toString());
        } catch (URISyntaxException err) {
            dynamicError("Base URI " + Err.wrap(base) + " is invalid: " + err.getMessage(),
                    "FORG0002", context);
            return null;
        }
View Full Code Here

            case NAMESPACE_URI:
                String uri = node.getURI();
                s = (uri==null ? "" : uri);
                        // null should no longer be returned, but the spec has changed, so it's
                        // better to be defensive
                return new AnyURIValue(s);

            case GENERATE_ID:
                FastStringBuffer buffer = new FastStringBuffer(16);
                node.generateId(buffer);
                return new StringValue(buffer);

            case DOCUMENT_URI:
                // If the node is in the document pool, get the URI under which it is registered.
                // Otherwise, return its systemId.
                if (node.getNodeKind() == Type.DOCUMENT) {
                    DocumentPool pool = c.getController().getDocumentPool();
                    String docURI = pool.getDocumentURI(node);
                    if (docURI == null) {
                        docURI = node.getSystemId();
                    }
                    if (docURI == null) {
                        return null;
                    } else if ("".equals(docURI)) {
                        return null;
                    } else {
                        return new AnyURIValue(docURI);
                    }
                } else {
                    return null;
                }
            case NODE_NAME:
View Full Code Here

TOP

Related Classes of org.pdf4j.saxon.value.AnyURIValue

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.