X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=devtools%2Fsvg2rects.xqe;h=e944b9424f57ccfa3035f8b254628f5ddd09078d;hb=6b303f122e303184a54b19689f75e215593d1c5f;hp=b360eb3b74cb8a814420760ffc94aa6aef4f518a;hpb=71957ab3c52ebd55ade7bdc02272b722199006fc;p=nothing.git diff --git a/devtools/svg2rects.xqe b/devtools/svg2rects.xqe index b360eb3b..e944b942 100644 --- a/devtools/svg2rects.xqe +++ b/devtools/svg2rects.xqe @@ -65,7 +65,11 @@ let $backplatforms := for $rect in $rects where matches($rect/@id, "^backrect.*" $rect/@height, " ", replace($rect/@style, ".*fill:#([0-9a-z]{6}).*", "$1") ) -return ( +return if (count($player) = 0) then ( + error(QName('', 'ERROR'), 'Position of the Player is not defined. Create a rectangle with id "player"') +) else if (count($background) = 0) then ( + error(QName('', 'ERROR'), 'Color of the Background is not defined. Create a rectangle with id "background"') +) else ( $background, $player, count($platforms),