Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43414

Missing conformant implementation of 'import module namespace' nukes XQuery for complex projects

    XMLWordPrintable

Details

    Description

      I have been creating a UI framework around the use of XQuery for (re-)rendering multiple views of XML data which is dynamically edited within the same UI. However, the lack of XQuery 1.0 conformance around module imports... http://www.w3.org/TR/xquery/#id-module-import ...is almost fatal to my endeavours.

      In experiments so far, all the XQuery files I've used for testing have been self-contained, (including some moderately complex functions) but with the expectation of creating library files to encapsulate functionality for reuse and to move towards a more terse declaration of individual XQueries and their presentation, using common function definitions imported from library files as I have done with other XQuery frameworks, including Zorba, Saxon, and as indicated in the XQuery 1.0 standard.

      Now I have reached the complexity limit where I need to share function definitions between XQuery views. I embarked on modularising the XQuery into libraries, I was surprised and disappointed to find this line in https://qt.gitorious.org/qt/qt/source/0ade09152067324f74678f2de4d447b6e0280600:src/xmlpatterns/parser/querytransformparser.ypp line 2046 which reads...
      parseInfo->staticContext->error(QtXmlPatterns::tr("The module import feature is not supported"),

      So at the present time a major conformance feature, XQuery module imports, are impossible, meaning all functions used have to be declared directly within every XQuery file used, destroying modularity.

      I believe the effort to implement imports, given the whole XQuery engine has already been built, is relatively low, and the significance for usability of the QXmlPatterns module would be huge. The Qt source line is annotated with the phrase 'this is temporary until we have implemented it' and the rest of the framework around validating the correct declaration of module imports is already there.

      I'm genuinely wondering if I can indeed effectively use the Qt Framework to implement this project properly without at least a workaround to avoid the duplication of boilerplate function definitions throughout the individual XQuery scripts I use for this project. Hence I would suggest a 'important' priority assignment.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            cefn Cefn Hoile
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes