Package net.sf.saxon.value

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


            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

                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

                    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

            }
        }

        try {
            URI resolved = 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

         */

        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

            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();
                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

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

        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

TOP

Related Classes of net.sf.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.