[Bug 26469] New: [xslt 3.0] Streamed validation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 26469] New: [xslt 3.0] Streamed validation

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26469

            Bug ID: 26469
           Summary: [xslt 3.0] Streamed validation
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

In looking at the streamability of the xsl-to-json() we found that it is
difficult to see how to validate the streamed input without creating an
in-memory copy. If the stylesheet did the xsl:stream instruction itself then it
could invoke validation at this point, but if it accepts streamed input from
its caller then it cannot do this.

Also, xsl:stream can only validate the entire input stream, not selected parts
of it.

Apart from xsl:stream, the only way to invoke validation is

<xsl:variable name="x">
  <xsl:copy-of select="..." validation="strict"/>
</xsl:variable>

and this creates a grounded (in-memory) copy.

A possible solution might be a validate() function with the property that if
the input is a streamed document, then the output is a streamed document, so
one could do for example

xsl:apply-templates select="validate(.)"

to apply validation to a stream without grounding it.

Another solution might be a more general mechanism for multi-phase streamed
processing, this might allow something like

<xsl:flow>
  <xsl:document>
    <xsl:copy-of select="." validation="strict"/>
  </xsl:document>
  <xsl:apply-templates select="."/>
</xsl:flow>

where each child instruction of xsl:flow takes the result of the previous
instruction as its input (i.e. as the context item)

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26469] [xslt 3.0] Streamed validation

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26469

Michael Kay <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Michael Kay <[hidden email]> ---
Decided to close this as "won't fix". We recognize that there are many use
cases for multi-phase streaming and this is one, but the potential
ramifications make it too risky (we don't have any functions currently that
convert one stream of nodes into another stream of nodes, and the implications
on streamability analysis are difficult to predict).

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26469] [xslt 3.0] Streamed validation

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26469

Innovimax <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from Innovimax <[hidden email]> ---
As an additional comment, there is certainly room with using xsl:accumulator to
do some ad hoc validation if needed

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