[feature] add mkdir -p
like function to xmldb XQuery module
#4238
Labels
enhancement
new features, suggestions, etc.
mkdir -p
like function to xmldb XQuery module
#4238
I've seen one-off implementations - and built one of my own - to solve a common problem:
On the linux command line this is possible by setting the
-p
flag onmkdir
.nodeJS for example mimics this behaviour by setting the
recursive
option on the builtinfs.mkdir
method.There is no such facility present in eXistdb to my knowledge. That is why I propose to add that by either
xmldb:create-collection-recursive
accepting one parameter:xmldb:create-collection
accepting two parameters:currently available functions
xmldb:create-collection
,xmldb:collection-available
and the like. While this is definitely a controversial proposal it also has the potential to rethink our current approach while maintaining backwards compatibility.The fact that xmldb:create-collection already has a two parameter signature does rule out option 2 unless we choose to also
introduce a breaking change. The current
xmldb:create-collection#2
would have to be changed toxmldb:create-collection($collectionUri as xs:string) as xs:string
removing the parent collection parameter that is currently expected.I personally favor having the collection URIs to be in one parameter but certainly am open to discuss the motivation behind the current implementation.
The text was updated successfully, but these errors were encountered: