You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My XQuery like this: for $cit in /*:CitedReferenceCIT[@status = 'D'] where contains($cit/@file, "#") return string-join(base-uri($cit/@file))
When I run this query, I got the error prompt like this: Error: Stopped at C:/Users/Administrator/Desktop/XQuery/233Update.xq, 3/28: [XQST0046] URI '/STD_KR_CIT_ZIP/20160927/20070102/20070102-1-001.ZIP/1/KR202007000003512KR00200700003560ACITKO20070102KR00#/KR202007000003512KR00200700003560ACITKO20070102KR00#.XML' is invalid.
It seems related to the '#', but this is what it is in the file path, there is no way to overcome this, Can anyone tell me how to overcome this?
The text was updated successfully, but these errors were encountered:
Various characters (#, ^) are no legal URI characters. They would need to be encoded before they are stored in a database. As this introduces backword compatibility issues (…after the change, a file #.xml will need to be adressed by db:open('db', '%23.xml'), it has not been fixed so far.
A hack to overcome this could be to create your uri manually (e.g. via 'iri-to-uri(file:///' || $your-root-directory || $cit/@file)). Maybe you don’t even need to encode the path to a base URI, but this depends on what you what you do with it. And I assume that your usage of string-join is obsolete?
As this is a duplicate of #1172, I’ll be closing this issue. For general questions and unconfirmed bugs, please write to our basex-talk mailing list.
My XQuery like this:
for $cit in /*:CitedReferenceCIT[@status = 'D'] where contains($cit/@file, "#") return string-join(base-uri($cit/@file))
When I run this query, I got the error prompt like this:
Error: Stopped at C:/Users/Administrator/Desktop/XQuery/233Update.xq, 3/28: [XQST0046] URI '/STD_KR_CIT_ZIP/20160927/20070102/20070102-1-001.ZIP/1/KR202007000003512KR00200700003560ACITKO20070102KR00#/KR202007000003512KR00200700003560ACITKO20070102KR00#.XML' is invalid.
It seems related to the '#', but this is what it is in the file path, there is no way to overcome this, Can anyone tell me how to overcome this?
The text was updated successfully, but these errors were encountered: