Skip to content

[BUG] URL rewrite article validation errors #928

@duncdrum

Description

@duncdrum

the URL rewrite article contains multiple instances
of text literal programlistings

<programlisting language="xml">&lt;dispatch xmlns="http://exist.sourceforge.net/NS/exist"&gt;
  &lt;forward url="{$exist:controller}/modules/transform.xq"&gt;
    &lt;add-parameter name="doc" value="{$exist:resource}.xml"/&gt;
  &lt;/forward&gt;
&lt;/dispatch&gt;</programlisting>

The test suite rightfully flags those:

(:~ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions