Project

Profile

Help

Feature #4512

closed

Streamable assertions

Added by Michael Kay about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Streaming
Sprint/Milestone:
-
Start date:
2020-04-04
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
10
Fixed in Maintenance Release:
Platforms:

Description

In response to bug #4507, I am looking at the possibility of implementing streamable XSD assertions.

The general approach is as follows:

  1. Add an attribute saxon:streamable=true|false to xsd:assert. If true, then at schema compile time we assess the streamability of the XPath expression. If it's motionless or consuming, proceed as follows. Otherwise, issue a warning and ignore the request for streaming.

  2. If the assertion is motionless (looks at attributes only) then evaluate it while positioned at the start tag. We can do this whether or not we are currently building a tree for other assertions. This should be pretty straightforward.

  3. If the assertion is consuming, and we are not already building a tree for some ancestor element, then open a Watch with the WatchManager to evaluate the assertion. This is rather more complex, but it should be possible to do it by reusing existing machinery.

Please register to edit this issue

Also available in: Atom PDF