46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
declare namespace m = "http://www.w3.org/2005/10/feed-validator";
|
|
|
|
parse-xml(x:request(x:form(
|
|
<form action="https://validator.w3.org/feed/check.cgi">
|
|
<input name="output" value="soap12" />
|
|
<input name="url" value="https://envs.net/~lucidiot/rsrsss/feed.xml" />
|
|
</form>
|
|
))/raw)//m:feedvalidationresponse ! concat(
|
|
"W3C feed validation results for ",
|
|
m:uri,
|
|
" on ",
|
|
m:date,
|
|
": ",
|
|
switch (m:validity)
|
|
case "true" return "VALID"
|
|
case "false" return "INVALID"
|
|
default return concat("UNKNOWN (", ., ")"),
|
|
" ",
|
|
m:errors/m:errorcount,
|
|
" errors, ",
|
|
m:warnings/m:warningcount,
|
|
" warnings, ",
|
|
m:informations/m:infocount,
|
|
" informations ",
|
|
string-join((
|
|
m:errors/m:errorlist/error,
|
|
m:warnings/m:warninglist/warning,
|
|
m:informations/m:infolist/info
|
|
) ! concat(
|
|
" ",
|
|
upper-case(name()),
|
|
" at line ",
|
|
if (backupline ne line) then backupline else line,
|
|
", column ",
|
|
if (backupcolumn ne column) then backupcolumn else column,
|
|
": ",
|
|
text,
|
|
if (number(msgcount) gt 1) then concat(" Repeated ", msgcount, "times") else "",
|
|
" Documentation: https://validator.w3.org/feed/docs/",
|
|
lower-case(name()),
|
|
"/",
|
|
type,
|
|
".html"
|
|
), " ")
|
|
)
|