I am using all of this under jdk 1.4 without any issues. I just had to
include the extra jars that the newer version of saxon needed.
By catching a higher exception the dependancy on saxon 8.1.1 can be
removed and the saxon library will be pluggable with any upward version 
even on jdk1.4 ( Assuming that you include the new saxan dependant jars
)

Marius.

On Thu, 5 Jan 2006 12:44:40 -0800, "Cezar Andrei" <[EMAIL PROTECTED]> said:
> Marius, 
> 
> See a previous answer on this topic: 
> http://www.mail-archive.com/user@xmlbeans.apache.org/msg00836.html
> 
> We're still committed to have XMLBeans working with a 1.4 JDK, so we
> cannot apply your patch right now. But starting with v3 we'll most
> probably drop this requirement and your patch will come handy.
> 
> Cezar
> 
> > -----Original Message-----
> > From: Marius Gleeson [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 28, 2005 9:03 PM
> > To: dev@xmlbeans.apache.org; user@xmlbeans.apache.org
> > Subject: Saxon 8.1.1 dependency & saxon namespaces
> > 
> > I am using a later version of saxon by making a simple change to the
> > following classes and rebuilding the xbean_xpath.jar
> > 
> > File:org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.java
> > Change
> >  import net.sf.saxon.xpath.XPathException
> > to
> >  import net.sf.saxon.trans.XPathException
> > 
> > File:org.apache.xmlbeans.impl.xpath.saxon.XBeansXQuery.java
> > Change
> >  import net.sf.saxon.xpath.XPathException
> >  import net.sf.saxon.xpath.StaticError
> > to
> >  import net.sf.saxon.trans.XPathException
> >  import net.sf.saxon.trans.StaticError
> > 
> > This will allow you to use the new versions of Saxon as the only
> problem
> > is a package name change.
> > It would be good to maybe replace the explicit catching of these
> > exceptions with more generic ones so that any version of Saxon can be
> > used without the need to have a different xbean_xpath.jar.
> > 
> > While on the topic, I have needed to pass namespaces to the Saxon
> engine
> > for xpath processing.
> > However this is not possible through the xmlbeans interfaces because
> it
> > creates a new (empty) Map and hands this to saxon as its namespace
> list.
> > I have however made a simple change to
> > org.apache.xmlbeans.impl.store.Path to allow it to use the namespace
> map
> > in the XmlOptions instance that is passed on the call to selectPath.
> > The following snipit from my org.apache.xmlbeans.impl.store.Path.java
> > shows the changes,
> > 
> > From Line 78
> > public static Path getCompiledPath(String pathExpr, XmlOptions
> options)
> >     {
> >         options = XmlOptions.maskNull(options);
> > 
> >         int force =
> >                 options.hasOption(_useXqrlForXpath)
> >                 ? USE_XQRL
> >                 : options.hasOption(_useXbeanForXpath)
> >                 ? USE_XBEAN
> >                 : USE_XBEAN|USE_XQRL|USE_SAXON; //set all bits
> > //******* passing options parameter
> >         return getCompiledPath(pathExpr, force,
> >         getCurrentNodeVar(options),options);
> >     }
> > 
> > //******* added options parameter to this method
> >     static synchronized Path getCompiledPath(String pathExpr, int
> force,
> >         String currentVar,XmlOptions options)
> >     {
> >         Path path = null;
> >         Map namespaces = null;
> > //******* If there are suggested namespaces then use them instead of
> > just creating an empty map.
> >         if ((options != null) &&
> >         (options.hasOption(XmlOptions.SAVE_SUGGESTED_PREFIXES)) ) {
> >             namespaces = (Map)
> >             options.get(XmlOptions.SAVE_SUGGESTED_PREFIXES);
> >         }
> >         else {
> >             namespaces = (force & USE_SAXON) != 0 ? new HashMap() :
> >             null;
> >         }
> >   .
> >   .
> >   .
> > 
> > It would be really great to have this functionality back in the main
> > branch.
> > 
> > Thanks,
> > Marius.
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to