/// <summary>
        /// Create a new StaticError, wrapping a Saxon XPathException
        /// </summary>

        internal StaticError(TransformerException err) {
            if (err is XPathException) {
                this.exception = (XPathException)err;
            } else {
                this.exception = JStaticError.makeStaticError(err);
            }
        }
Exemplo n.º 2
0
 public override void startDocument(int properties)
 {
     if (ended)
     {
         JXPathException e = new JXPathException("Only a single document can be written to an XdmDestination");
         throw new DynamicError(e);
     }
     base.startDocument(properties);
     level++;
 }
Exemplo n.º 3
0
 public override void startElement(NodeName nameCode, JSchemaType typeCode, int locationId, int properties)
 {
     if (ended)
     {
         JXPathException e = new JXPathException("Only a single root node can be written to an XdmDestination");
         throw new DynamicError(e);
     }
     base.startElement(nameCode, typeCode, locationId, properties);
     level++;
 }
Exemplo n.º 4
0
        // internal constructor: Create a new DynamicError, wrapping a Saxon XPathException

        internal DynamicError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
Exemplo n.º 5
0
        // internal constructor: Create a new DynamicError, wrapping an SaxonApiException

        internal DynamicError(JSaxonApiException err)
        {
            if (err.getCause() is XPathException)
            {
                this.exception = (XPathException)err.getCause();
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Evaluate the query, returning the result as an <c>IEnumerator</c> (that is,
        /// an enumerator over a sequence of nodes and/or atomic values).
        /// </summary>
        /// <returns>
        /// An enumerator over the sequence that represents the results of the query.
        /// Each object in this sequence will be an instance of <c>XdmItem</c>. Note
        /// that the query may be evaluated lazily, which means that a successful response
        /// from this method does not imply that the query has executed successfully: failures
        /// may be reported later while retrieving items from the iterator.
        /// </returns>
        /// <exception cref="DynamicError">Throws a <c>DynamicError</c> if any run-time failure
        /// occurs while evaluating the expression.</exception>

        public IEnumerator GetEnumerator()
        {
            try
            {
                return(new SequenceEnumerator <XdmItem>(evaluator.iterator()));
            }
            catch (net.sf.saxon.s9api.SaxonApiUncheckedException err)
            {
                throw new DynamicError(JXPathException.makeXPathException(err));
            }
        }
Exemplo n.º 7
0
        // internal constructor: Create a new StaticError, wrapping a Saxon XPathException

        internal StaticError(JException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// Create a new StaticError, wrapping a Saxon XPathException
        /// </summary>

        internal StaticError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = JStaticError.makeStaticError(err);
            }
        }
Exemplo n.º 9
0
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output. This
        /// method sets the destination base URI to the URI corresponding to the name of the supplied file.</param>
        /// <exception cref="DynamicError">Throws a <c>DynamicError</c> if it is not possible to
        /// create an output stream to write to this file, for example, if the filename is in a
        /// directory that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                serializer.setOutputFile(new java.io.File(filename));
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
Exemplo n.º 10
0
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output</param>
        /// <exception>Throws a <c>DynamicError</c> if it is not possible to create an output
        /// stream to write to this file, for example, if the filename is in a directory
        /// that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                outputStream = new JFileOutputStream(filename);
                mustClose    = true;
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Create a new DynamicError, wrapping a Saxon XPathException
        /// </summary>
        /// <param name="err">The exception to be wrapped</param>

        internal DynamicError(TransformerException err)
        {
            if (err is XPathException)
            {
                this.exception = (XPathException)err;
            }
            else
            {
                this.exception = XPathException.makeXPathException(err);
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>

        public DynamicError(String message)
        {
            exception = new JDynamicError(message);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>
        /// <param name="message">The error message</param>

        public DynamicError(String message)
        {
            exception = new XPathException(message);
        }
Exemplo n.º 14
0
        /// <summary>Specify the destination of the serialized output, in the
        /// form of a file name</summary>
        /// <param name="filename">The name of the file to receive the serialized output</param>
        /// <exception>Throws a <c>DynamicError</c> if it is not possible to create an output
        /// stream to write to this file, for example, if the filename is in a directory
        /// that does not exist.</exception>

        public void SetOutputFile(String filename)
        {
            try
            {
                outputStream = new JFileOutputStream(filename);
                mustClose = true;
            }
            catch (java.io.IOException err)
            {
                JXPathException e = new JXPathException(err);
                throw new DynamicError(e);
            }
        }
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>

        public DynamicError(String message) {
            exception = new JDynamicError(message);
        }
Exemplo n.º 16
0
 internal XmlProcessingError(JXmlProcessingError err) : base(XPathException.fromXmlProcessingError(err))
 {
     this.error = err;
 }
Exemplo n.º 17
0
        /// <summary>
        /// Create a new DynamicError, specifying the error message
        /// </summary>
        /// <param name="message">The error message</param>

        public DynamicError(String message)
        {
            exception = new XPathException(message);
        }