Examples of AnyURIValue


Examples of client.net.sf.saxon.ce.value.AnyURIValue

            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(FastStringBuffer.TINY);
                node.generateId(buffer);
                buffer.condense();
View Full Code Here

Examples of client.net.sf.saxon.ce.value.AnyURIValue

            if (docURI == null) {
                return null;
            } else if ("".equals(docURI)) {
                return null;
            } else {
                return new AnyURIValue(docURI);
            }
        } else {
            return null;
        }
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.value.AnyURIValue

                    RoleLocator role = new RoleLocator(RoleLocator.FUNCTION, "one-or-more", 1);
                    role.setErrorCode("FORG0004");
                    return CardinalityChecker.makeCardinalityChecker(staticArgs[0], StaticProperty.ALLOWS_ONE_OR_MORE, role);
                } else if ("static-base-uri".equals(local) && staticArgs.length == 0) {
                        String baseURI = env.getBaseURI();
                        return (baseURI == null ? Literal.makeEmptySequence() : new Literal(new AnyURIValue(baseURI)));
                } else if ("trace".equals(local) && staticArgs.length == 2) {
                    return staticArgs[0];
                } else if ("unordered".equals(local) && staticArgs.length == 1) {
                    return staticArgs[0];
                } else if ("unparsed-entity-uri".equals(local) && staticArgs.length == 1) {
View Full Code Here

Examples of client.net.sf.saxon.ce.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

Examples of client.net.sf.saxon.ce.value.AnyURIValue

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

Examples of client.net.sf.saxon.ce.value.AnyURIValue

        try {
            URI absoluteURI = new URI(base, true);
            if (!absoluteURI.isAbsolute()) {
                URI relativeURI = new URI(relative, true);
                if (relativeURI.isAbsolute()) {
                    return new AnyURIValue(relative);
                }
                dynamicError(msgBase + "in resolve-uri(): Base URI " + Err.wrap(base) + " is not an absolute URI", "FORG0002", context);
                return null;
            }
            URI resolved = makeAbsolute(relative,  base);
            return new AnyURIValue(resolved.toString());
        } catch (URI.URISyntaxException err) {
            dynamicError(msgBase + "Base URI " + Err.wrap(base) + " is invalid: " + err.getMessage(),
                    "FORG0002", context);
            return null;
        }
View Full Code Here

Examples of net.sf.saxon.value.AnyURIValue

        break;
      case Type.PROCESSING_INSTRUCTION:
        value = new ProcessingInstruction(node.getLocalPart(), node.getStringValue());
        break;
      case Type.NAMESPACE:
        value = convertAtomicValue(new AnyURIValue(node.getStringValue()));
//        value = new nu.xom.Namespace(node.getLocalPart(), node.getStringValue(), (Element) convertNodeInfo(node.getParent()));
        break;
      default:
        throw new IllegalArgumentException(
          "Illegal NodeInfo kind: " + node.getClass().getName());
View Full Code Here

Examples of net.sf.saxon.value.AnyURIValue

            try {
                uri = new URI(collectionElement.getBaseURI()).resolve(longName);
            } catch (URISyntaxException e) {
                throw new XPathException(e);
            }
            documents.add(new AnyURIValue(uri.toString()));
        }
        return new ListIterator(documents);
    }
View Full Code Here

Examples of net.sf.saxon.value.AnyURIValue

                if (docName.startsWith("collection")) {
                    NodeInfo collectionElement = getCollectionElement(catalog, docName, collectionNT, idAtt);
                    CollectionURIResolver r =
                            new XQTSCollectionURIResolver(catalog, collectionElement, false);
                    saConfig.setCollectionURIResolver(r);
                    dqc.setParameterValue(variableName, new AnyURIValue(docName));
                } else {
                    DocumentInfo doc = loadDocument(docName);
                    if (doc == null) {
                        dqc.setParameterValue(variableName, new AnyURIValue("error-document" + docName));
                    } else {
                        String uri = doc.getSystemId();
                        dqc.setParameterValue(variableName, new AnyURIValue(uri));
                    }
                }
            }
        }
    }
View Full Code Here

Examples of net.sf.saxon.value.AnyURIValue

                    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
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.