diff --git a/schema/pretext-dev.rnc b/schema/pretext-dev.rnc index 18b4e1698a..359b767267 100644 --- a/schema/pretext-dev.rnc +++ b/schema/pretext-dev.rnc @@ -425,9 +425,7 @@ empty } # Text parses to a formula representing a constant (no free - # variables). N.B. @reduce here follows sample usage; the - # maintainer's description lists it only on de-expression - # and de-evaluate. + # variables). @reduce determines if the internal representation is simplified or not. DENumber = element de-number { attribute reduce {"yes"}?, @@ -458,12 +456,11 @@ DEExpression | DEEvaluate | Eval } # The variable of a substitution or evaluation carries its - # value; plain-text values happen to work as raw Javascript - # but are deliberately NOT valid + # value; plain-text values happen to work as raw Javascript automatically wrapped in de-number DEVariableValued = element variable { attribute name {text}, - (Eval | DENumber | DEExpression) + (Eval | DENumber | DEExpression | DEEvaluate) } # The variable of a differentiation is name-only DEVariableEmpty = diff --git a/schema/pretext-dev.rng b/schema/pretext-dev.rng index 88d604e437..6d8a7592ed 100644 --- a/schema/pretext-dev.rng +++ b/schema/pretext-dev.rng @@ -1006,9 +1006,8 @@ @@ -1083,7 +1082,7 @@ @@ -1092,6 +1091,7 @@ + diff --git a/schema/pretext.xml b/schema/pretext.xml index 8328377710..978b0bd202 100644 --- a/schema/pretext.xml +++ b/schema/pretext.xml @@ -2573,9 +2573,7 @@ empty } # Text parses to a formula representing a constant (no free - # variables). N.B. @reduce here follows sample usage; the - # maintainer's description lists it only on de-expression - # and de-evaluate. + # variables). @reduce determines if the internal representation is simplified or not. DENumber = element de-number { attribute reduce {"yes"}?, @@ -2606,12 +2604,11 @@ DEExpression | DEEvaluate | Eval } # The variable of a substitution or evaluation carries its - # value; plain-text values happen to work as raw Javascript - # but are deliberately NOT valid + # value; plain-text values happen to work as raw Javascript automatically wrapped in de-number DEVariableValued = element variable { attribute name {text}, - (Eval | DENumber | DEExpression) + (Eval | DENumber | DEExpression | DEEvaluate) } # The variable of a differentiation is name-only DEVariableEmpty = diff --git a/xsl/pretext-runestone-fitb.xsl b/xsl/pretext-runestone-fitb.xsl index a13c1cb13a..5b7098f50c 100644 --- a/xsl/pretext-runestone-fitb.xsl +++ b/xsl/pretext-runestone-fitb.xsl @@ -386,7 +386,10 @@ - + + PTX:FALLBACK: evaluate[@all='yes'] in "" has multiple test elements; only the first will be used as the correctness check. + + @@ -412,6 +415,9 @@ [ + + PTX:WARNING: evaluate element has test[@correct="yes"] that will be ignored because evaluate[@all="yes"] is active in "". + @@ -1010,8 +1016,10 @@ - + + + v. @@ -1024,10 +1032,21 @@ .parseExpression( - + , "number") - .reduce().simplifyConstants() + + .reduce().simplifyConstants() + + + + + + + + + + @@ -1188,13 +1207,16 @@ : - - + + - + + + +