Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-727

Need XPath 2.0 for expression language

XMLWordPrintableJSON

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • s15
    • s9
    • Back End
    • None

      DFDL expression language is based on a subset of XPath 2.0.

      The "2.0" here is important, because XPath 2.0 is strongly typed, and does math in appropriate types. (XPath 1.0 casts everything to double, creating many problems with integer values that have decimal points in them, loss of precision, etc.)

      At some point we should either implement the DFDL expression language directly, or plug in an XPath 2.0 implementation instead.

      This has implications for JDOM usage, etc. (right now we use JDOM because it works with Saxon-B as our infoset)

      Note below by J. Cranford, about an alternative XPath implementation to Saxonica's Saxon versions:

      PsychoPath (http://wiki.eclipse.org/PsychoPathXPathProcessor) is an XPath2 processor that is now part of the Eclipse project. Xerces-J bundles it for XPath 2.0 support, used in XML Schema 1.1 assertions.

      The somewhat tricky part is that psychopath releases are part of eclipse releases, so there isn't an obvious place to go to get just the latest PsychoPath release. Basically, you have to get the latest Eclipse Web Tools Platform (WTP) release and pull the jar straight out of there. Instructions are at http://wiki.eclipse.org/PsychoPathXPathProcessor/UserManual, with specific link to WTP project in Xerces FAQ at http://xerces.apache.org/xerces2-j/faq-xs.html#faq-2.

      Options as I see them (in no particular order):

      1. Extends JDOM's xpath API directly to plug in PsychoPath.
      2. Extend psychopath to support JDOM directly.
      3. Modify the underlying infoset to not be JDOM.

              jchab Jessie Chab
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: