blob: 2145a9bd7a24f42f29fd53ba42db506592b8de10 [file] [log] [blame]
<?xml version="1.0"?>
<D:multistatus xmlns:D="DAV:" xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:collection="http://apache.org/cocoon/collection/1.0">
<jx:set var="sourceURL" value="${usecase.getParameter('sourceURL')}"/>
<jx:set var="dateFormat" value="${usecase.getParameter('dateFormat')}"/>
<jx:set var="checkedOut" value="${usecase.getParameter('rc')}"/>
<jx:forEach var="doc" items="${usecase.getParameter('documents')}"
varStatus="status">
<jx:if test="${doc.getId()}">
<jx:set var="fileExtension" value="${doc.getSourceExtension()}"/>
<jx:if test="${doc.getSourceExtension().equals('xml')}">
<jx:set var="fileExtension" value="html"/>
</jx:if>
<D:response>
<D:href>${request.getContextPath()}/${doc.getPublication().getId()}/webdav${doc.getPath()}_${doc.getLanguage()}.${fileExtension}</D:href>
<D:propstat>
<D:prop>
<D:displayname>${doc.getName()}_${doc.getLanguage()}.${fileExtension}</D:displayname>
<D:getlastmodified>${dateFormat.format(doc.getLastModified())}</D:getlastmodified>
<D:creationdate/>
<D:getcontenttype>application/xml</D:getcontenttype>
<D:getcontentlength>${doc.getFile().length()}</D:getcontentlength>
<D:resourcetype/>
<D:lockdiscovery>
<jx:if test="${checkedOut[status.index] != null}">
<D:activelock>
<D:locktype><D:write/></D:locktype>
<D:lockscope><D:exclusive/></D:lockscope>
<D:depth>0</D:depth>
<D:owner><D:href>${checkedOut[status.index].getIdentity()}</D:href></D:owner>
<D:timeout>Infinite</D:timeout>
<D:locktoken>
<D:href>${usecase.getParameter('sourceURL')}</D:href>
</D:locktoken>
</D:activelock>
</jx:if>
</D:lockdiscovery>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</jx:if>
</jx:forEach>
</D:multistatus>