Hi Sebastian,
thanks again for your report. There's a problem with the implementation of fn:put as the current solution based on Java FileOutputStream can't handle the kind of URI we discussed earlier [1].
We'll let you know as soon as we fixed this issue.
Regards, Lukas
[1] http://www.w3.org/TR/xmlschema-2/#anyURI
On Tue, May 24, 2011 at 10:19 AM, Sebastian.Wiemer@bertelsmann.de wrote:
Hi Lukas,
Hi Sebastian,
…
As for now, to make your example work, you could either switch on the 'writeback' command of BaseX [1], or process the return value of fn:base-uri to make it a working path expression.
I actually tried using the ‘writeback’ switch already. But that took suspiciously long. It turned out, that all files were touched by the write back feature, not only the affected files.
BTW: My solution was to fix the URI: put ($temp, replace(base-uri($doc),’file:/’,’file://’))
Regards,
Sebastian
[1] http://docs.basex.org/wiki/Options#Database_options [2] http://en.wikipedia.org/wiki/File_URI_scheme#Windows_2
On Tue, May 24, 2011 at 8:50 AM, Sebastian.Wiemer@bertelsmann.de wrote:
Hello,
In an fn:put(TempNode,URI) I would expect base-uri(Node) as a URI parameter to work.
But base-uri(Node) returns on Windows “file:/C:/somepath/somefile.xml”,
which does not work, because the URI cannot be opened. The URI “/somepath/somefile.xml” works.
And *file://C/somepath/somefile.xml* does also work.
Is this a bug?
example:
let $doc:= doc(“bla.xml”)
put(
copy $temp := $doc
modify replace value of node $temp/n with lower-case($temp/n) return $temp,base-uri($doc)
)
(: this does not work, but should it not? :)
best regards,
*Sebastian*
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de