Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pdn-certic
MaX
Commits
59fba5ad
Commit
59fba5ad
authored
May 27, 2020
by
Arnaud Daret
Browse files
Test pour inclure un fragment depuis un autre
parent
0ce26064
Changes
1
Hide whitespace changes
Inline
Side-by-side
max.xq
View file @
59fba5ad
...
...
@@ -108,6 +108,24 @@ function max:page($project, $page){
catch
err:XPTY0004
{
max:max-error
(
'Configuration dupliquée - Veuillez vérifier votre fichier de configuration'
,
$err:description
,
$err:module
,
$err:line-number
)}
};
(:gets a project's HTML fragment page:)
declare
%rest:GET
%output:method
(
"xml"
)
%output:indent
(
"no"
)
%output:encoding
(
"UTF-8"
)
%rest:path
(
"/{$project}/html_fragment/{$page=[a-zA-Z0-9_]+}"
)
function
max:html_fragment
(
$project
,
$page
){
try
{
let
$content
:=
max.html:getHTMLFragmentFile
(
$project
,
$page
)
return
$content
}
catch
err:FODC0002
{
max:max-error
(
'Page/fragment '
||
$page
||
' introuvable ou mal formé'
,
$err:description
,
$err:module
,
$err:line-number
)}
catch
err:config
{
max:max-error
(
''
,
$err:description
,
$err:module
,
$err:line-number
)}
catch
err:FODC0002
{
max:max-error
(
''
,
$err:description
,
$err:module
,
$err:line-number
)}
catch
err:XPTY0004
{
max:max-error
(
'Configuration dupliquée - Veuillez vérifier votre fichier de configuration'
,
$err:description
,
$err:module
,
$err:line-number
)}
};
declare
%rest:GET
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment