<?xml version="1.0" encoding="ISO-8859-1"?>
<document url="http://jaxen.org/faq.xml">
  <body>
    <title>Frequently Asked Questions</title>
    
    <section title="What is Jaxen?">
      <p>
      The <i>Jaxen</i> project is a Java XPath Engine.
      <i>Jaxen</i> is a universal object model walker, capable of evaluating
      XPath expressions across multiple models.  Currently supported
      are <a href="http://dom4j.org">dom4j</a> and <a href="http://jdom.org">JDOM</a>.
      </p>
    </section>

    <section title="What is the Jaxen license?">
      <p>We use an Apache-style open source license which is one of the least
        restrictive licenses around, you can use <i>Jaxen</i> to create new products
        without them having to be open source.
      </p>
    </section>

    <section title="Why is Jaxen useful?">
      <p>
      After implementing an XPath engine for both <a href="http://dom4j.org">dom4j</a> and
      <a href="http://jdom.org">JDOM</a>, and attempting to keep them both in sync, it was
      decided that factoring out the commonality would be a Good Thing.  Thus, <i>Jaxen</i>
      provides a single point for XPath expression evaluation, regardless of the target
      object model, whether its <b>dom4j</b>, <b>JDOM</b>, <b>DOM</b>, <b>JavaBeans</b>,
      or whatnot.
      </p>
    </section>

    <section title="Why is Jaxen better than &lt;some other xpath technology&gt;">
      <p>
      <i>Jaxen</i> is better than <b>werken.xpath</b> specifically because it better
      handles XPath expressions, and syntax error reporting.  Additionally, since
      Jaxen is a unified code-base, developer effort isn't split between maintaining
      the <b>dom4j</b> version and the <b>JDOM</b> version.  More hands working on
      the same project reduces bug count.
      </p>

      <p>
      <i>Jaxen</i> may be perceived to be better than other XPath technologies since it
      provides a single cohesive API for evaluating XPaths against multiple object
      models.  Learn the <i>Jaxen</i> API, and apply it to <b>dom4j</b>, <b>JDOM</b>,
      <b>EXML</b> or <b>DOM</b> trees in exactly the same way.
      </p>

      <p>
      Also, since <i>Jaxen</i> works against an adaptor which provides InfoSet access
      to arbitrary object models, it should be possible to build even larger
      tools in terms of <i>Jaxen</i>, to work with multiple models.  For example, an
      <b>XQL</b> engine could be developed, which would automagically work with
      all models already supported by <i>Jaxen</i>.
      </p>
    </section>

    <section title="What are some related technologies?">
      <p>
      <i>Jaxen</i> currently has navigators defined for <a href="http://dom4j.org/">dom4j</a>
      and <a href="http://jdom.org/">JDOM</a>, two popular and convenient object models
      for representing XML documents.  Additionally, <a href="http://themindelectric.com/">The Mind Electric's</a>
      EXML is supported, providing better XPath support within the GLUE platform.
      Of course, <a href="http://w3c.org/">W3C DOM</a> is also supported.
      </p>
    </section>

    <section title="How do I support a different object model?">
      <p>
      The only thing required is an implementation of the interface 
      <code>org.jaxen.Navigator</code>.  Not all of the interface is required,
      and a default implementation, in the form of <code>org.jaxen.DefaultNavigator</code>
      is also provided.
      </p>

      <p>
      Since many of the XPath axes can be defined in terms of each other (for example,
      the <code>ancestor</code> axis is merely a the <code>parent</code> recursively
      applied), only a few low-level axis iterators are required to initially get
      started.  Of course, you may implement them directly, instead of relying upon
      <i>Jaxen</i>'s composition ability.
      </p>

    </section>

    <section title="Is Jaxen only good for XPath evaluation?">
      <p>
      No. 
      </p>

      <p>
      The <i>DocumentNavigators</i> provided with <i>Jaxen</i> would be used
      by themselves, without the XPath evaluation engine, to provide univeral
      access to many object models for other technologies.
      </p>
    </section>

    <section title="Who uses Jaxen?">
      <p>
      <i>Jaxen</i> has been embedded directly into <b>dom4j</b> to provide
      easy XPath evaluation directly from your documents.  Additionally, it's
      being integrated into David Megginson's 
      <a href="http://sourceforge.net/projects/newsml-toolkit/">NewsML Framework</a>.
      </p>
    </section>

  </body>
</document>










