W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2005

[Bug 1264] [XSLT] Reconsider XTDE1480

From: <bugzilla@wiggum.w3.org>
Date: Thu, 21 Apr 2005 19:12:43 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DOh6R-000440-Vz@wiggum.w3.org>


------- Additional Comments From mike@saxonica.com  2005-04-21 19:12 -------
I'm sympathetic to the reuqirement, but I think we need to find a way to do it
cleanly. There are three possible problems if we simply remove the restriction:

(a) the processor might decide that it doesn't need to evaluate the variable,
and the result document then won't be written out.

(b) the processor might decide to evaluate the variable more than once, and the
xsl:result-document instruction will then fail saying two output files with the
same URI have been written

(c) the processor might decide that it only needs to evaluate the variable
partially, for example it might avoid evaluating a subtree that is never
accessed. As with (a) this may cause the result document not to be written, but
in ways that the user will find very hard to debug.

I think a potential solution is to add an attribute
writes-result-document="yes|no" to xsl:variable. If the value is yes, then the
processor is constrained to evaluate the variable as if it were itself a final
result tree (that is, to evaluate it in final output mode), and then assign this
"final result tree" to the variable; it's also constrained to only evaluate the
variable once. It may be tricky to formalize the semantics of this, but it
sounds like a feasible hack.

Michael Kay
Received on Thursday, 21 April 2005 19:12:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:23 UTC