简体   繁体   English

Exist-DB:对存储的XProc文件(xpl扩展名)的REST GET返回错误

[英]Exist-DB: REST GET to stored XProc file (xpl extension) returns error

In Exist 2.2, When I try to access any .xpl files with REST GET, I get the following error: 在Exist 2.2中,当我尝试使用REST GET访问任何.xpl文件时,出现以下错误:

/db/beheer/pipe.xpl err:XPST0003 error found while loading module xproc: Error while loading module http://xproc.net/xproc : unexpected token: ! /db/beheer/pipe.xpl err:XPST0003加载模块xproc时发现错误:加载模块http://xproc.net/xproc时错误:意外令牌:! (while expecting closing tag for element constructor: null) [at line 1, column 2] (同时期望元素构造函数的结束标记:null)[在第1行,第2列]

It seems to me that Exist is processing the *.xpl as if it was something it could execute (like a stored xquery) but then it cannot do so and returns an error. 在我看来,Exist正在处理* .xpl,就好像它可以执行一样(例如存储的xquery),但后来却无法执行并返回错误。

Is there an easy way to let it return just the XML (the XProc as is instead of error message)? 是否有一种简单的方法让它仅返回XML(XProc照原样而不是错误消息)?

Indeed, eXist consults its list of Internet Media Types when you do a HTTP GET using the REST Server and if it thinks that it is an XProc it will attempt to execute it as such. 的确,当您使用REST Server执行HTTP GET时,eXist会查阅其Internet媒体类型列表,并且如果它认为它是XProc,它将尝试以这种方式执行它。

You can change what eXist thinks is an XProc by editing $EXIST_HOME/mime-type.xml and then restarting eXist. 您可以通过编辑$EXIST_HOME/mime-type.xml并重新启动eXist来更改eXist认为是XProc的内容。 You most likely want to move the .xpl extension from the mimetype application/xml+xproc to application/xml . 您很可能希望将.xpl扩展名从mimetype application/xml+xproc移至application/xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM