Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-275

XQuery with latest from svn + Saxon 8.6.1 gives different result from 2.1.0 + Saxon 8.1.1

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • unspecified, Version 2.2
    • Version 2.2.1
    • XPath
    • None
    • Windows XP

    Description

      As of svn revision 378309, XMLBeans works with Saxon 8.6.1. Before that, it only works with Saxon 8.1.1.
      I ran the XQueryXPath sample (ant run) using a 2.1.0 release with Saxon 8.1.1 jar in the classpath, and then using the latest from svn with Saxon 8.6.1 jars in the classpath.
      The following XQuery led to different results:

      // The expression: Get the <zip> elements and return them as children
      // of a new <zip-list> element.
      String queryExpression =
      "let $e := $this/xq:employees " +
      "return " +
      "<zip-list> " +
      "

      {for $z in $e/xq:employee/xq:address/xq:zip " + "return $z}

      " +
      "</zip-list>";

      XMLBeans 2.1.0 + Saxon 8.1.1:
      [java] Running ExecQuery.selectZipsNewDocCursor

      [java] The query results:

      [java] <zip-list xmlns:emp="http://xmlbeans.apache.org/samples/xquery/employees">
      [java] <emp:zip>98115</emp:zip>
      [java] <emp:zip>98052</emp:zip>
      [java] <emp:zip>97125</emp:zip>
      [java] <emp:zip>97303</emp:zip>
      [java] <emp:zip>98115</emp:zip>
      [java] <emp:zip>98052</emp:zip>
      [java] </zip-list>

      Latest svn + Saxon 8.6.1:

      [java] Running ExecQuery.selectZipsNewDocCursor

      [java] The query results:

      [java] <xml-fragment>net.sf.saxon.tinytree.TinyElementImpl@1e152c5</xml-fragment>

      The former are the expected results. They are also the same results obtained when using the BEA XQuery engine (against both XMLBeans 2.1.0 and latest svn).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            wypoon Wing Yew Poon
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment