Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Ingest must be able to deal with XML files that have an XML declaration #473

Open
3 tasks
dariok opened this issue Apr 14, 2021 · 1 comment
Open
3 tasks
Assignees
Labels
Milestone

Comments

@dariok
Copy link
Owner

dariok commented Apr 14, 2021

Storing a well formed file with a valid XML declaration must not fail!

  • if this boils down to a wrong behaviour of xmldb:store, open an issue for eXist.
  • as a work around, remove declaration in wdbri:store
  • when an error is thrown by wdbri:store, rest-files.xql:79ff. must not be executed but the error returned
Caused by: org.exist.xquery.XPathException: exerr:ERROR Type error: the given string 'error storing text/xml to //db/apps/edoc/data/amwg//texts/0049.xml:
java:org.xmldb.api.base.XMLDBException: The XML parser reported a problem: fatal error at (2,6) : The processing instruction target matching "[xX][mM][lL]" is not allowed. XMLDB reported an exception while storing documentorg.xmldb.api.base.XMLDBException: The XML parser reported a problem: fatal error at (2,6) : The processing instruction target matching "[xX][mM][lL]" is not allowed.' cannot be cast to xs:anyURI [at line 80, column 7, source: /db/apps/edoc/rest/rest-files.xql]
In function:
        wdbRMi:enterMetaXML(xs:anyURI) [80:7:/db/apps/edoc/rest/ingest.xqm]
        wdbRf:storeFile(xs:string, xs:string, xs:string*) [-1:-1:/db/apps/edoc/rest/rest-files.xql]
        at org.exist.xquery.value.AnyURIValue.<init>(AnyURIValue.java:115) ~[exist-core-5.2.0.jar:5.2.0]
        at org.exist.xquery.value.StringValue.convertTo(StringValue.java:454) ~[exist-core-5.2.0.jar:5.2.0]
@dariok dariok added this to the v 2.0 milestone Apr 14, 2021
@dariok dariok self-assigned this Apr 14, 2021
@dariok dariok modified the milestones: Backlog 2024, REST v2 Dec 19, 2024
@dariok dariok added REST and removed bug asap labels Dec 19, 2024
@dariok
Copy link
Owner Author

dariok commented Dec 19, 2024

Check this with REST v2, Cf. #574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant