qtiworks icon indicating copy to clipboard operation
qtiworks copied to clipboard

Rendering of printedVariable blows up if @index is a variable reference

Open davemckain opened this issue 10 years ago • 1 comments

The rendering XSLT for printedVariable is currently expecting @index to be an integer, rather than integerOrVariableRef, and is consequently blowing up if the attribute is a variable reference.

davemckain avatar Jan 05 '15 10:01 davemckain

This one is going to require some effort to fix. The current rendering of printedVariable does all of the variable de-referencing within the XSLT. Handling integerOrVariableRef is non-trivial (as one can see from the corresponding implementation of this within the Java classes). I think it might be better to add an XML filter to the rendering pipeline the computes the final value for each printedVariable (using the existing Java logic) and substitutes the result into the XML before it gets passed to the rendering XSLT. That would simplify the amount of work the XSLT has to do here.

davemckain avatar Jan 21 '15 09:01 davemckain