cvc-complex-type.3.2.2 attribute 'uuid' is not allowed to appear in element 'jasperreport'

后端 未结 11 962
盖世英雄少女心
盖世英雄少女心 2020-12-02 23:57

Downloaded iReport-4.6.0 for Linux and when creating a new report via the File->New... menu, the new report is not shown in the preview, but the error message cvc-comp

11条回答
  •  -上瘾入骨i
    2020-12-03 00:41

    I just suggested my coworker who also run into the problem this:

    sed -i 's/ uuid="[^"]*"//g' $(find * -name \*.jrxml)
    

    I don’t normally use sed(1)-i but she’s on GNU/Linux so it wasn’t a problem here. The more professional Unix way of solving this is:

    find * -name \*.jrxml -print0 | while IFS= read -d '' -r file; do
        ed -s "$file" <<-'EOF'
            1,$g/ uuid="[^"]*"/s///g
            w
            q
        EOF
    done
    

    (These four spaces are tabs, otherwise it won’t work, and you need mksh(1) or another shell that can read NUL-separated input.)

    You could also use Perl:

    find * -name \*.jrxml -print0 | xargs -0 perl -pi -e 's/ uuid="[^"]*"//g'
    

    Or something like that, anyway, depending on your needs, your xargs(1), etc. ;-)

提交回复
热议问题