1 |
<xsl:stylesheet version="1.0" |
2 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3 |
xmlns:webdav="http://cocoon.apache.org/webdav/1.0" |
4 |
xmlns:d="DAV:" |
5 |
xmlns:dasl="http://cocoon.apache.org/webdav/dasl/1.0" |
6 |
> |
7 |
|
8 |
<!-- |
9 |
This XSLT transforms the output of the Webdav Transformer into a format |
10 |
similar to the output of the DASL Transformer, making the transition from |
11 |
the latter to the first easier. |
12 |
--> |
13 |
|
14 |
<xsl:param name="prefix"/> |
15 |
|
16 |
<xsl:template match="/"> |
17 |
<dasl:query-result> |
18 |
<xsl:for-each select="/webdav:response/webdav:body/d:multistatus/d:response"> |
19 |
<xsl:apply-templates select="."/> |
20 |
</xsl:for-each> |
21 |
</dasl:query-result> |
22 |
</xsl:template> |
23 |
|
24 |
<xsl:template match="d:response[contains(d:status, '404')]"/> |
25 |
|
26 |
<xsl:template match="d:response"> |
27 |
<dasl:resource dasl:path="{d:href}"> |
28 |
<xsl:copy-of select="d:propstat/d:prop/child::node()"/> |
29 |
</dasl:resource> |
30 |
</xsl:template> |
31 |
|
32 |
</xsl:stylesheet> |