Skip to content
Snippets Groups Projects
Commit 43f20ffe authored by root's avatar root
Browse files

enable changing collection preface and saving saved-charters

parent 9a63aa00
Branches
No related tags found
2 merge requests!911Exist next,!908enable changing collection preface and saving saved-charters
......@@ -32,27 +32,23 @@ along with VdU/VRET. If not, see http://www.gnu.org/licenses.
<xrx:variables>
<xrx:variable>
<xrx:name>$atomid</xrx:name>
<xrx:expression>$data//atom:id/text()</xrx:expression>
<xrx:expression>if($data//atom:id) then $data//atom:id/text() else root(request:get-data())//atom:id/text()</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$tokens</xrx:name>
<xrx:expression>tokenize($atomid, '/')</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$collection</xrx:name>
<xrx:expression>tokenize($tokens[last()-1], '-')</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$regex</xrx:name>
<xrx:expression>"[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}"</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$isGUID</xrx:name>
<xrx:expression>matches($tokens[last()-1], $regex)</xrx:expression>
<xrx:expression>matches($tokens[last()], $regex)</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$base-collection</xrx:name>
<xrx:expression>if( $isGUID ) then $user:db-base-collection else metadata:base-collection('charter', 'saved')</xrx:expression>
<xrx:expression>if( not(contains($atomid, "charter" ) )) then $user:db-base-collection else metadata:base-collection('charter', 'saved')</xrx:expression>
</xrx:variable>
<xrx:variable>
<xrx:name>$entry</xrx:name>
......@@ -105,4 +101,4 @@ along with VdU/VRET. If not, see http://www.gnu.org/licenses.
}
</xrx:body>
</xrx:service>
\ No newline at end of file
</xrx:service>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment