How should the handling of parameters be done in the edge case of empty string input?
Currently, the use of the pattern test="$start and $identifier eq $start" handles empty string input the same way as (), since $start evaluates to false when $start is the empty string.
Examples:
target/bin/xslt.sh -config:saxon.he.xml -s:test/john.xml -xsl:xsl/document.xsl tree=page-hateoas start='' end=p.2 -ea:on
ERROR: bad parameter combination: start required end and vice versa
Error at xsl:value-of on line 55 column 50 of tree.xsl:
XTMM9000 Processing terminated by xsl:message at line 55 in tree.xsl
During lazy evaluation of map:merge(...) on line 64 of file:/home/clueck/src/scdh/tei-processing/dts-transformations/xsl/tree.xsl
In function dts:validate-parameters on line 35 column 95 of tree.xsl:
invoked by function call at file:/home/clueck/src/scdh/tei-processing/dts-transformations/xsl/document.xsl#106
In template document on line 104 column 52 of document.xsl:
invoked by xsl:call-template (tail calls omitted) at file:/home/clueck/src/scdh/tei-processing/dts-transformations/xsl/document.xsl#101
Processing terminated by xsl:message at line 55 in tree.xsl
The following consequently returns the whole document:
target/bin/xslt.sh -config:saxon.he.xml -s:test/john.xml -xsl:xsl/document.xsl tree=page-hateoas ref='' -ea:on
How should the handling of parameters be done in the edge case of empty string input?
Currently, the use of the pattern
test="$start and $identifier eq $start"handles empty string input the same way as(), since$startevaluates tofalsewhen$startis the empty string.Examples:
The following consequently returns the whole document:
target/bin/xslt.sh -config:saxon.he.xml -s:test/john.xml -xsl:xsl/document.xsl tree=page-hateoas ref='' -ea:on