Loading src/main/core/routes.xqm +7 −2 Changes for src/main/core/routes.xqm: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ declare %rest:GET %output:method("html") %output:html-version('5') %rest:path("/{$lang=[a-z]{2}}/{$page=[a-zA-Z0-9_]+}.html") %rest:path("/{$lang=[a-z]{2}}/{$page=[a-zA-Z0-9_\-]+}.html") function routes:autoroute($lang as xs:string, $page as xs:string){ try { let $xqueryFile := utils:get-autoroute-file-path($page || '.xq') Loading @@ -106,7 +106,12 @@ function routes:autoroute($lang as xs:string, $page as xs:string){ let $content := utils:doc-to-html((), $page, $lang) return $content } catch err:max-database { errors:error($err:code, $err:description, $err:line-number, $lang) } catch err:max-database { errors:error($err:code, $err:description, $err:line-number, $lang) } catch err:XPTY0004 { errors:not-found($page || ".xq autoroute file not found" ,$lang) } catch * {errors:error($err:code, $err:description, $err:line-number, $lang)} } }; Loading Loading
src/main/core/routes.xqm +7 −2 Changes for src/main/core/routes.xqm: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -95,7 +95,7 @@ declare %rest:GET %output:method("html") %output:html-version('5') %rest:path("/{$lang=[a-z]{2}}/{$page=[a-zA-Z0-9_]+}.html") %rest:path("/{$lang=[a-z]{2}}/{$page=[a-zA-Z0-9_\-]+}.html") function routes:autoroute($lang as xs:string, $page as xs:string){ try { let $xqueryFile := utils:get-autoroute-file-path($page || '.xq') Loading @@ -106,7 +106,12 @@ function routes:autoroute($lang as xs:string, $page as xs:string){ let $content := utils:doc-to-html((), $page, $lang) return $content } catch err:max-database { errors:error($err:code, $err:description, $err:line-number, $lang) } catch err:max-database { errors:error($err:code, $err:description, $err:line-number, $lang) } catch err:XPTY0004 { errors:not-found($page || ".xq autoroute file not found" ,$lang) } catch * {errors:error($err:code, $err:description, $err:line-number, $lang)} } }; Loading