-
-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
Description
the URL rewrite article contains multiple instances
of text literal programlistings
<programlisting language="xml"><dispatch xmlns="http://exist.sourceforge.net/NS/exist">
<forward url="{$exist:controller}/modules/transform.xq">
<add-parameter name="doc" value="{$exist:resource}.xml"/>
</forward>
</dispatch></programlisting>
The test suite rightfully flags those:
documentation/src/main/xar-resources/modules/test-suite.xql
Lines 137 to 157 in 06ef4fb
(:~ Make sure that programlistings for xml do not contain string contents | |
: use <tag> for short snippets, listing-x.xml files for trees. | |
: @see author-reference | |
: @return empty-sequence or name of document with faulty listing | |
:) | |
declare | |
%test:name('Pro angular brackets') | |
%test:assertEmpty | |
function tests:no-ecaped-listings() { | |
let $target := collection($config:data-root)//db5:programlisting[@language='xml'] | |
let $cdata := for $n in $target | |
let $title := $n/ancestor::db5:article/db5:info/db5:title | |
return | |
if ($n/string() eq '') | |
then () | |
else (util:document-name($title)) | |
return | |
distinct-values($cdata) | |
}; |
why was #872 merged despite the test failures