diff --git a/data/xmldb.xml b/data/xmldb.xml index 402869a3..e58e03b5 100644 --- a/data/xmldb.xml +++ b/data/xmldb.xml @@ -46,16 +46,16 @@ let $split-record := let $filename := concat(util:md5($rec/@rdf:about), ".xml") return - xdb:store("/db/output", $filename, $split-record)]]> + xmldb:store("/db/output", $filename, $split-record)]]> Let's look at this script in some detail. First, since we are using functions xmldb:create-collection() and xmldb:store(), which require the user to be logged in as a member of the dba group, we must log in using xmldb:login(). Once logged in, we can create a new sub-collection, called "output" using - xdb:create-collection, for which we need to be logged in + xmldb:create-collection, for which we need to be logged in appropriately using xmldb:login. Next, the for-loop iterates through all child elements of the - top RDF element. In each iteration, we use xdb:store to write out + top RDF element. In each iteration, we use xmldb:store to write out the current child node to a new document. Since a unique document name is required for each new document, we need a way to generate unique names. In this case, the URI contained in the rdf:about attribute is unique, so we simply