[Bug 24619] New: Conditional using of packages

https://www.w3.org/Bugs/Public/show_bug.cgi?id=24619

            Bug ID: 24619
           Summary: Conditional using of packages
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.online@xs4all.nl
        QA Contact: public-qt-comments@w3.org

Static variables are local to a package (and can be compiled into a package).
It is very reasonable to assumbe that, analogous to compiled languages, a given
package will exist in a debug or tracing version, and a release version.

The syntax of using packages currently is:

<xsl:use-package
  name = uri
  package-version? = token >
  <!-- Content: (xsl:accept | xsl:override)* -->
</xsl:use-package>

The only way one can use a package conditionally is by using xsl:use-when with
a static variable, say $DEBUG. This leads to the problem of having to fully
copy all xsl:overrides and xsl:accepts, which, considering these can contain a
fair amount of machinery, is not an ideal situation, let alone having to keep
track of each change in both branches.

A way to conditionally include packages without having to copy all overrides
and accepts seems like a vital necessity with packaging.

Ideas to solve this:
- disconnect the child-parent relation of xsl:use-package and
xsl:accept/override, placing them elsewhere (in which case some relation must
exist between the package and what you override)
- add children to use-package that specify the name and package-version, of
which at most one can be effectively available.

The second option seems the easiest of the two. Perhaps other options exist to
resolve this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 11 February 2014 10:01:16 UTC