Package net.sf.saxon.xpath

Examples of net.sf.saxon.xpath.DynamicError


    public GMonthDayValue(){};

    public GMonthDayValue(CharSequence value) throws XPathException {
        Matcher m = regex.matcher(value);
        if (!m.matches()) {
            throw new DynamicError("Cannot convert '" + value + "' to a gMonthDay");
        }
        String base = m.group(1);
        String tz = m.group(2);
        String date = "2000-" + base + (tz==null ? "" : tz);
        setLexicalValue(date);
View Full Code Here


        case Type.STRING:
            return new StringValue(getStringValue());
        case Type.UNTYPED_ATOMIC:
            return new UntypedAtomicValue(getStringValue());
        default:
            DynamicError err = new DynamicError("Cannot convert gMonthDay to " +
                                     StandardNames.getDisplayName(requiredType));
            err.setErrorCode("FORG0001");
            throw err;
        }
    }
View Full Code Here

    */

    public void open() throws XPathException {
        // System.err.println(this + " startDocument(), handler = " + handler);
        if (handler==null) {
            throw new DynamicError("ContentHandlerProxy.startDocument(): no underlying handler provided");
        }
        try {
            handler.setDocumentLocator(locator);
            handler.startDocument();
        } catch (SAXException err) {
            throw new DynamicError(err);
        }
        depth = 0;
    }
View Full Code Here

    public void close() throws XPathException {
        try {
            handler.endDocument();
        } catch (SAXException err) {
            throw new DynamicError(err);
        }
    }
View Full Code Here

        }
        try {
          handler.startPrefixMapping(prefix, uri);
            // TODO:BUG we are not calling the endPrefixMapping event!
        } catch (SAXException err) {
            throw new DynamicError(err);
        }
    }
View Full Code Here

        } catch (SAXException err) {
            Exception nested = err.getException();
            if (nested instanceof XPathException) {
                throw (XPathException)nested;
            } else if (nested instanceof SchemaException) {
                throw new DynamicError(nested);
            } else {
                throw new DynamicError(err);
            }
        }
    }
View Full Code Here

                String qname = (String)elementStack.pop();
                String localName = (String)elementStack.pop();
                String uri = (String)elementStack.pop();
                handler.endElement(uri, localName, qname);
            } catch (SAXException err) {
                throw new DynamicError(err);
            }
        }
        depth--;
        // if this was the outermost element, and well formed output is required
        // then no further elements will be processed
View Full Code Here

                }
            } else {
                handler.characters(chars.toString().toCharArray(), 0, chars.length());
            }
        } catch (SAXException err) {
            throw new DynamicError(err);
        }
        if (disable) setEscaping(true);
    }
View Full Code Here

    * The following function is called when it is found that the output is not a well-formed document.
    * Unless the ContentHandler accepts "balanced content", this is a fatal error.
    */

    protected void notifyNotWellFormed() throws XPathException {
        throw new DynamicError("The result tree cannot be supplied to the ContentHandler because it is not well-formed XML");
    }
View Full Code Here

    public void processingInstruction(String target, CharSequence data, int locationId, int properties)
    throws XPathException {
        try {
            handler.processingInstruction(target, data.toString());
        } catch (SAXException err) {
            throw new DynamicError(err);
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.xpath.DynamicError

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.