/** * Get the Base URI for the node, that is, the URI used for resolving a * relative URI contained in the node. */ public String getBaseURI() { return node.getBaseURI(); }
/** * Get the Base URI for the node, that is, the URI used for resolving a * relative URI contained in the node. */ public String getBaseURI() { return node.getBaseURI(); }
/** * Get the Base URI for the node, that is, the URI used for resolving a * relative URI contained in the node. */ public String getBaseURI() { return node.getBaseURI(); }
public MissingNodeException(final String nodeName, final Node parent) { super("Missing child Node["+nodeName+"] for Element["+parent.getBaseURI()+"]."); } }
public MissingNodeException(final String nodeName, final Node parent, final Exception cause) { super("Missing child Node["+nodeName+"] for Element["+parent.getBaseURI()+"].", cause); }
public OverissueNodeException(final String nodeName, final Nodes childNodes, final Node parent, final Exception cause) { super("Expected one Node[" + nodeName + "] but found " + childNodes.size() + " childs of parent Element[" + parent.getBaseURI() + "].", parent.getBaseURI(), cause); }
public NotOneNodeException(final String nodeName, final Nodes nodes, final Node parent, final Exception cause) { super("Found "+nodes.size()+" instead of one Node["+nodeName+"] in Element["+parent.getBaseURI()+"].", parent.getBaseURI(), cause); }
public OverissueNodeException(final String nodeName, final Nodes childElements, final Node parent) { super("Expected one Node[" + nodeName + "] but found " + childElements.size() + " childs of parent Element[" + parent.getBaseURI() + "]."); } }
public NotOneNodeException(final String nodeName, final Nodes nodes, final Node parent) { super("Found "+nodes.size()+" instead of one Node["+nodeName+"] in Element["+parent.getBaseURI()+"]."); } }
/** * Converts a xom node into something readable by Saxon * @param node * @param config * @return */ static NodeInfo wrap(Node node, Configuration config) { if (node == null) throw new IllegalArgumentException("node must not be null"); //$NON-NLS-1$ if (node instanceof DocType) throw new IllegalArgumentException("DocType can't be queried by XQuery/XPath"); //$NON-NLS-1$ Node root = node; while (root.getParent() != null) { root = root.getParent(); } XOMDocumentWrapper docWrapper = new XOMDocumentWrapper(root, root.getBaseURI(), config); return docWrapper.wrap(node); }