Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlRuntimeException


                {
                    if ((selections[ i ] = c.getObject()) == null)
                    {
                        if ( !c.toParent() || (selections[ i ] = c.getObject()) == null )
                        throw
                            new XmlRuntimeException(
                                "Path must select only elements " +
                                    "and attributes" );
                    }
                }
            }
View Full Code Here


            TypeStore typeStore = get_store();

            if (typeStore == null)
            {
                throw
                    new XmlRuntimeException(
                        "Cannot do XQuery on XML Value Objects" );
            }

            try
            {
                return _typedArray(typeStore.exec_query( queryExpr, options ));
            }
            catch (XmlException e)
            {
                throw new XmlRuntimeException( e );
            }
        }
    }
View Full Code Here

                                }
                            }
                        }
                        catch (InterruptedException e)
                        {
                            throw new XmlRuntimeException(e);
                        }
                        finally
                        {
                            if (acquired)
                                GlobalLock.release();
View Full Code Here

                        }
                    }
                }
                catch (InterruptedException e)
                {
                    throw new XmlRuntimeException(e);
                }
                finally
                {
                    if (acquired)
                        GlobalLock.release();
View Full Code Here

            }

        }
        catch (InterruptedException e)
        {
            throw new XmlRuntimeException(e);
        }
        finally
        {
            if (acquired)
                GlobalLock.release();
View Full Code Here

            }

        }
        catch (InterruptedException e)
        {
            throw new XmlRuntimeException(e);
        }
        finally
        {
            if (acquired)
                GlobalLock.release();
View Full Code Here

                XmlError err =
                    XmlError.forMessage(
                        "Use of undefined namespace prefix: " +
                            qName.substring( 0, qName.indexOf( ':' ) ));

                throw new XmlRuntimeException( err.toString(), null, err );
            }

            _context.begin( localName, namespaceURI );

            // BUGBUG - do more of the following to get line number for
            // as many parts of the XML as we can
            if (_wantLineNumbers)
            {
                _context.lineNumberAnnotation(
                    _startLocator.getLineNumber(),
                    _startLocator.getColumnNumber(),
                    -1 );
            }

            for ( int i = 0, len = atts.getLength() ; i < len ; i++ )
            {
                String aqn = atts.getQName( i );

                if (aqn.equals( "xmlns" ))
                {
                    _context.xmlns( "", atts.getValue( i ) );
                }
                else if (aqn.startsWith( "xmlns:" ))
                {
                    String prefix = aqn.substring( 6 );

                    if (prefix.length() == 0)
                    {
                        XmlError err =
                            XmlError.forMessage( "Prefix not specified", XmlError.SEVERITY_ERROR );

                        throw new XmlRuntimeException( err.toString(), null, err );
                    }

                    String uri = atts.getValue( i );

                    if (uri.length() == 0)
                    {
                        XmlError err =
                            XmlError.forMessage(
                                "Prefix can't be mapped to no namespace: " + prefix,
                                XmlError.SEVERITY_ERROR );

                        throw new XmlRuntimeException( err.toString(), null, err );
                    }

                    _context.xmlns( prefix, uri );
                }
                else
View Full Code Here

                    XmlError.forMessage(
                        "Prefix can't begin with XML: " + prefix,
                        XmlError.SEVERITY_ERROR );

                throw
                    new XmlRuntimeException(
                        err.toString(), null, err );
            }
        }
View Full Code Here

                _query.substring(this.boundary);
        try {
            this._xquery = _stcContext.compileQuery(queryExp);
        }
        catch (TransformerException e) {
            throw new XmlRuntimeException(e);
        }
    }
View Full Code Here

        {
            Locale.autoTypeDocument( c, null, null );
        }
        catch (XmlException e )
        {
            throw new XmlRuntimeException( e );
        }

        c.release();
       
        return doc;
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlRuntimeException

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.