Skip to content

Commit 1cb2503

Browse files
committed
Add some debug logging that is triggered when cardinality issues are encountered on submitting to GitHub
1 parent 622a1cc commit 1cb2503

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/xar-resources/services/submit.xql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,14 @@ declare function local:attrs-updated-source($attrs as attribute()*) as attribute
360360

361361
(: Markdown to TEI :)
362362
declare function local:markdown2TEI($node) as element(tei:p)* {
363+
if (count($node) gt 1)
364+
then
365+
(: <document>{root($n)}</document> :)
366+
let $nodes := for $n in $node return <node uri="{document-uri(root($n))}">{$n}</node>
367+
return
368+
util:log("INFO", ("PROBLEM: ", <nodes>{$nodes}</nodes>, <parent>{$node[1]/parent::node()}</parent>))
369+
else(),
370+
363371
for $l in tokenize($node, '\n\n')
364372
return
365373
<tei:p>{local:lineBreak($l)}</tei:p>

0 commit comments

Comments
 (0)