<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29832</bug_id>
          
          <creation_ts>2016-09-20 13:17:40 +0000</creation_ts>
          <short_desc>[FO31] fn:transform options</short_desc>
          <delta_ts>2016-12-16 19:55:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>andrew_coleman</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127437</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-20 13:17:40 +0000</bug_when>
    <thetext>I am missing some options that influence stylesheet behavior and are available in XSLT 3.0:

- switch assertions on or off, suggestion name &quot;assertions&quot;, value xs:boolean
- turn dynamic evaluation on/off
- set required XPath version
- request XSD 1.1 support
- backwards/forwards compatibility mode (see earlier bug 29830)
- switch fn:trace or xsl:message reporting on/off
- processor name + version (similar to system-properties, I suggest to mimic the same names as defined for fn:system-property), this can be of influence, for instance by calling a validating processor and wanting it to fail when such processor is not available
- similar to previous point: ability to switch validation on/of
- set environment variables for the execution context of the processor (though one can argue that this is too processor-dependent anyway, having the same name between processors is beneficial)
- switch streaming on/off. This has no influence on processing the stylesheet, but can be used to *require* a streaming processor


For some of these options you may argue that they are too processor-specific. But I think we should allow a user to make sure his expectations are met. If his stylesheet expects &quot;3 &gt; foo/@test&quot; to never fail, he must able to require such behavior.

Of more importance are dynamic evaluation (security!), assertions (also security, and usability), processor name/version.

Most of these items have a counterpart in fn:system-property, we could simply take that name for a value in the options map.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127453</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-20 19:19:32 +0000</bug_when>
    <thetext>I like the suggestion that many of these are inverses of the system-property() interrogative, and suggest we add a new option:

required-properties - a map describing the required properties of the XSLT processor to be used. If an entry with key K and value V is present in this map, this indicates a requirement that the processor should be one for which system-property(K) returns the value V, or a value considered by the implementation to be equivalent in the sense that applications are unlikely to be affected by the difference (for example a request for xsl:product-version=&quot;9&quot; might return a processor with xsl:product-version=&quot;9.0.0.1&quot;). However, any setting of xsl:version in this map is ignored since it would duplicate the effect of the xslt-version option. A value of &quot;no&quot; for a feature such as &quot;is-schema-aware&quot; or &quot;supports-dynamic-evaluation&quot; explicitly requests a processor that does not support this feature; if the application doesn&apos;t care whether the feature is supported or not, then no value should be supplied for this property in the required-properties map.

This covers most of your suggestions. For the remainder, I suggest top-level options:

enable-assertions  boolean  default false, switches assertion checking on or off
enable-trace       boolean  switches fn:trace on or off; default is impl-def
enable-messages    boolean  switches xsl:message on or off; default is impl-def

I think that validation is a bit of a minefield and we should leave it out (because of the problems of saying which documents we&apos;re talking about validating, and the interaction with other facilities such as xsl:source-document/@validation, and input-type-annotations).

I don&apos;t see a need to set environment variables - static parameters are much more useful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127464</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-21 00:35:30 +0000</bug_when>
    <thetext>Re comment#1:

&gt; I think that validation is a bit of a minefield and we should leave it out
Isn&apos;t that essentially covered by &quot;required-properties&quot; using &quot;xsl:is-schema-aware&quot;? Setting that to &quot;false&quot; for a schema-aware processor can invoke that processor with schema-validation and type checking turned off.

That&apos;s similar in how I envision xsl:supports-streaming is going to work. One processor may support streaming and non-streaming, and this can then be invoked by setting this property to true or false respectively.

&gt; I don&apos;t see a need to set environment variables - static parameters are much 
&gt; more useful.
Makes sense. Let&apos;s leave it to that.

----
This (your proposal) effectively creates the ability for users to test their stylesheets against a variety of configurations, which in turn may open the door for some serious XSLT Unit testing frameworks to emerge (here&apos;s hoping ;).

But I digress, I like the proposal.

One note: apart from xsl:version, which has no place here, I think xsl:vendor-url and xsl:vendor, have no lookup semantics. But we can also leave that to be defined by the implementers (which is the status-quo).

I think that the boolean values should be treated as xs:boolean, not as string &quot;yes&quot; or &quot;no&quot;, or &quot;true&quot; or &quot;false&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127499</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-22 14:49:16 +0000</bug_when>
    <thetext>One other observation which I&apos;ll add given that we are reviewing this: the spec talks of the options map containing a specified list of options &quot;and nothing else&quot;, which is inconsistent with the optional parameter conventions, which indicate that superfluous options are ignored.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127564</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-09-27 20:37:10 +0000</bug_when>
    <thetext>The proposed change has been implemented; the bug is left open so the WG can review the editor&apos;s proposed text.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127600</commentid>
    <comment_count>5</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-09-29 13:53:02 +0000</bug_when>
    <thetext>Thanks. I have read it in the current internal WD and it looks good to me. Esp. the part that explains that a processor can ignore parts of this as it sees fit, or raise FOXT0001.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127687</commentid>
    <comment_count>6</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2016-10-07 10:51:15 +0000</bug_when>
    <thetext>At the meeting on 2016-10-04, the WG reviewed and approved the change.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>