You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by dave <ce...@yahoo.com> on 2008/01/02 02:34:35 UTC

when do you need these jars: resolver.jar,etc..

I could compile the Schema and run my Java app which
uses this schema Jar using only 3 Jars:
jsr173_1.0_api.jar  xbean.jar  xmlbeans-qname.jar

Why would I ever need resolver.jar and xmlpublic.jar?

I use J2SE 1.4.x

-D


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: how to get jdom Document from XmlObject efficiently?

Posted by Jacob Danner <ja...@gmail.com>.
AFAIK there isn't a convenience API to go from XmlObject to JDom Document.
However, you can go from XmlObject to org.w3c.dom Node Object using
XmlObject.newDomNode(). One thing to note that I particularly enjoy is that
XMLBeans provides a DOM2 Level API/Implementation so you can go seamless
from
DOM <->  XmlCursor <-> XmlObject
Once this feature was implemented I stopped using JDom, but I'm sure there
is some kind of convenience method to go from org.w3c DOM to JDom.
Best of luck,
-jacobd



On Jan 2, 2008 7:04 PM, dave <ce...@yahoo.com> wrote:

>
> I have an XmlObject type document object produced out
> of XmlBeans processing. What is efficient way to
> convert this  XmlObject type to org.jdom.Document ?
>
> Thanks
> -D
>
>
>
>  ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

how to get jdom Document from XmlObject efficiently?

Posted by dave <ce...@yahoo.com>.
I have an XmlObject type document object produced out
of XmlBeans processing. What is efficient way to
convert this  XmlObject type to org.jdom.Document ?

Thanks
-D


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: how stable is xpath handling in XMLBeans (even a basic expression fails with RunTimeException)

Posted by Jacob Danner <ja...@gmail.com>.
I've always viewed Xpath as a subset of XQuery.

When the statements get too complex for xmlbeans to handle internally, it
delegates to the available engine to process. This way XMLBeans does not
need to implement an internal xpath engine, but rather can piggy back off
the richer, fuller feature set of xquery.

The xbean_xpath.jar is the hookup between xmlbeans and the xquery engine. In
the 1.x release, it provided the hookup to jaxen. In the 2.x release, it
provides the hookup for saxon.

-jacobd

On Jan 2, 2008 5:38 PM, dave <ce...@yahoo.com> wrote:

>
> As per documentation, saxon is required for XQuery. Am
> only using Xpath. To my understanding, I only need
> xbean_xpath.jar in addition to regular Jars to do some
> complex(like predicates,etc) Xpath processing.
>
>
> -D
>
> --- Jacob Danner <ja...@gmail.com> wrote:
>
> > Do you have saxon8.jar in your classpath when
> > executing these xpath
> > statements? It doesn't look like thats the case.
> > The way XMLBeans handles xpath is to look to see if
> > it can handle the
> > statement internally, and then it looks for
> > available engines on the
> > classpath. It appears to fail when trying to find
> > Saxon. If you don't think
> > this is the case, can you post the whole stacktrace?
> > There is a blurb about Saxon on the website under
> > the 2.3 release news
> > http://xmlbeans.apache.org/
> >
> > -jacobd
> >
> > On Jan 2, 2008 5:07 PM, dave <ce...@yahoo.com>
> > wrote:
> >
> > >
> > > I was just trying to use count() funtion in a
> > simple
> > > Xpath expression and I get this RuntimeException :
> > >  Exception in thread "main"
> > > java.lang.RuntimeException:  Trying XBeans path
> > > engine... Trying XQRL... Trying Saxon... FAILED on
> > > declare namespace ns=....
> > >
> > > I see numerous postings from others who had the
> > > similar issue and there are no responses
> > indicating
> > > any specific solution. Before I waste some more
> > time
> > > on this, I just wanted to know if it's even worth
> > > using XPath support in XmlBeans.
> > >
> > > Here's my env:
> > >  xmlbeans 2.3.0 + all the latest Jars in
> > classpath.
> > >
> > >  The expression having issue:
> > > "count($this/ns:root/ns:owners/ns:owner)"
> > >
> > > I also tried the following but has the similar
> > issue:
> > > "count(//ns:owners/ns:owner)"
> > >
> > >  Tried getting all the owner elements (Still the
> > same
> > > issue):
> > >  "$this//ns:owners/ns:owner"
> > > But this works: "$this/ns:root/ns:owners/ns:owner"
> > >
> > > any clues to get this simple crap working!!
> > >
> > > OR should I switch to Jdom for Xpath processing?
> > >
> > > -D
>
>
>
>
>  ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

Re: how stable is xpath handling in XMLBeans (even a basic expression fails with RunTimeException)

Posted by dave <ce...@yahoo.com>.
As per documentation, saxon is required for XQuery. Am
only using Xpath. To my understanding, I only need
xbean_xpath.jar in addition to regular Jars to do some
complex(like predicates,etc) Xpath processing.


-D

--- Jacob Danner <ja...@gmail.com> wrote:

> Do you have saxon8.jar in your classpath when
> executing these xpath
> statements? It doesn't look like thats the case.
> The way XMLBeans handles xpath is to look to see if
> it can handle the
> statement internally, and then it looks for
> available engines on the
> classpath. It appears to fail when trying to find
> Saxon. If you don't think
> this is the case, can you post the whole stacktrace?
> There is a blurb about Saxon on the website under
> the 2.3 release news
> http://xmlbeans.apache.org/
> 
> -jacobd
> 
> On Jan 2, 2008 5:07 PM, dave <ce...@yahoo.com>
> wrote:
> 
> >
> > I was just trying to use count() funtion in a
> simple
> > Xpath expression and I get this RuntimeException :
> >  Exception in thread "main"
> > java.lang.RuntimeException:  Trying XBeans path
> > engine... Trying XQRL... Trying Saxon... FAILED on
> > declare namespace ns=....
> >
> > I see numerous postings from others who had the
> > similar issue and there are no responses
> indicating
> > any specific solution. Before I waste some more
> time
> > on this, I just wanted to know if it's even worth
> > using XPath support in XmlBeans.
> >
> > Here's my env:
> >  xmlbeans 2.3.0 + all the latest Jars in
> classpath.
> >
> >  The expression having issue:
> > "count($this/ns:root/ns:owners/ns:owner)"
> >
> > I also tried the following but has the similar
> issue:
> > "count(//ns:owners/ns:owner)"
> >
> >  Tried getting all the owner elements (Still the
> same
> > issue):
> >  "$this//ns:owners/ns:owner"
> > But this works: "$this/ns:root/ns:owners/ns:owner"
> >
> > any clues to get this simple crap working!!
> >
> > OR should I switch to Jdom for Xpath processing?
> >
> > -D



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: how stable is xpath handling in XMLBeans (even a basic expression fails with RunTimeException)

Posted by Jacob Danner <ja...@gmail.com>.
Do you have saxon8.jar in your classpath when executing these xpath
statements? It doesn't look like thats the case.
The way XMLBeans handles xpath is to look to see if it can handle the
statement internally, and then it looks for available engines on the
classpath. It appears to fail when trying to find Saxon. If you don't think
this is the case, can you post the whole stacktrace?
There is a blurb about Saxon on the website under the 2.3 release news
http://xmlbeans.apache.org/

-jacobd

On Jan 2, 2008 5:07 PM, dave <ce...@yahoo.com> wrote:

>
> I was just trying to use count() funtion in a simple
> Xpath expression and I get this RuntimeException :
>  Exception in thread "main"
> java.lang.RuntimeException:  Trying XBeans path
> engine... Trying XQRL... Trying Saxon... FAILED on
> declare namespace ns=....
>
> I see numerous postings from others who had the
> similar issue and there are no responses indicating
> any specific solution. Before I waste some more time
> on this, I just wanted to know if it's even worth
> using XPath support in XmlBeans.
>
> Here's my env:
>  xmlbeans 2.3.0 + all the latest Jars in classpath.
>
>  The expression having issue:
> "count($this/ns:root/ns:owners/ns:owner)"
>
> I also tried the following but has the similar issue:
> "count(//ns:owners/ns:owner)"
>
>  Tried getting all the owner elements (Still the same
> issue):
>  "$this//ns:owners/ns:owner"
> But this works: "$this/ns:root/ns:owners/ns:owner"
>
> any clues to get this simple crap working!!
>
> OR should I switch to Jdom for Xpath processing?
>
> -D
>
>
>
>  ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

how stable is xpath handling in XMLBeans (even a basic expression fails with RunTimeException)

Posted by dave <ce...@yahoo.com>.
I was just trying to use count() funtion in a simple
Xpath expression and I get this RuntimeException :
  Exception in thread "main"
java.lang.RuntimeException:  Trying XBeans path
engine... Trying XQRL... Trying Saxon... FAILED on
declare namespace ns=....

I see numerous postings from others who had the
similar issue and there are no responses indicating
any specific solution. Before I waste some more time
on this, I just wanted to know if it's even worth
using XPath support in XmlBeans.

Here's my env:
 xmlbeans 2.3.0 + all the latest Jars in classpath.

 The expression having issue:
"count($this/ns:root/ns:owners/ns:owner)"

I also tried the following but has the similar issue:
"count(//ns:owners/ns:owner)"

 Tried getting all the owner elements (Still the same
issue):
 "$this//ns:owners/ns:owner"
But this works: "$this/ns:root/ns:owners/ns:owner"

any clues to get this simple crap working!!

OR should I switch to Jdom for Xpath processing?

-D


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: when do you need these jars: resolver.jar,etc..

Posted by dave <ce...@yahoo.com>.
so, if I use xmlpublic.jar to compile, do I need it
during Runtime as well?

-D
--- Cezar Andrei <ce...@bea.com> wrote:

> Classes in xmlpublic.jar are contained in xbean.jar.
> xmlpublic.jar can
> be used for java compilation to make sure an
> application is not using
> any private unsupported APIs.
> 
> Cezar
> 
> > -----Original Message-----
> > From: dave [mailto:ceek63@yahoo.com]
> > Sent: Tuesday, January 01, 2008 7:42 PM
> > To: user@xmlbeans.apache.org
> > Subject: Re: when do you need these jars:
> resolver.jar,etc..
> > 
> > i found that resolver.jar s required when catalog
> is
> > used. i guess if I already use xbean.jar, I may
> not
> > require xmlpublic.jar at all.
> > 
> > --- dave <ce...@yahoo.com> wrote:
> > 
> > >
> > > I could compile the Schema and run my Java app
> which
> > > uses this schema Jar using only 3 Jars:
> > > jsr173_1.0_api.jar  xbean.jar 
> xmlbeans-qname.jar
> > >
> > > Why would I ever need resolver.jar and
> > > xmlpublic.jar?



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


RE: when do you need these jars: resolver.jar,etc..

Posted by Cezar Andrei <ce...@bea.com>.
Classes in xmlpublic.jar are contained in xbean.jar. xmlpublic.jar can
be used for java compilation to make sure an application is not using
any private unsupported APIs.

Cezar

> -----Original Message-----
> From: dave [mailto:ceek63@yahoo.com]
> Sent: Tuesday, January 01, 2008 7:42 PM
> To: user@xmlbeans.apache.org
> Subject: Re: when do you need these jars: resolver.jar,etc..
> 
> i found that resolver.jar s required when catalog is
> used. i guess if I already use xbean.jar, I may not
> require xmlpublic.jar at all.
> 
> --- dave <ce...@yahoo.com> wrote:
> 
> >
> > I could compile the Schema and run my Java app which
> > uses this schema Jar using only 3 Jars:
> > jsr173_1.0_api.jar  xbean.jar  xmlbeans-qname.jar
> >
> > Why would I ever need resolver.jar and
> > xmlpublic.jar?
> 
> 
> 
>
________________________________________________________________________
__
> __________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org


Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: when do you need these jars: resolver.jar,etc..

Posted by dave <ce...@yahoo.com>.
i found that resolver.jar s required when catalog is
used. i guess if I already use xbean.jar, I may not
require xmlpublic.jar at all.

--- dave <ce...@yahoo.com> wrote:

> 
> I could compile the Schema and run my Java app which
> uses this schema Jar using only 3 Jars:
> jsr173_1.0_api.jar  xbean.jar  xmlbeans-qname.jar
> 
> Why would I ever need resolver.jar and
> xmlpublic.jar?


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org