Add support for allprop and propname

This commit is contained in:
Brandon Robins
2018-01-30 22:59:55 -06:00
parent 13b5dbc989
commit 9f21799206
4 changed files with 203 additions and 37 deletions

View File

@@ -0,0 +1,25 @@
# frozen_string_literal: false
module Support
module Examples
module Propfind
def self.allprop
<<~XML
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:allprop/>
</D:propfind>
XML
end
def self.propname
<<~XML
<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
<D:propname/>
</D:propfind>
XML
end
end
end
end

View File

@@ -0,0 +1,28 @@
# frozen_string_literal: false
module Support
module Examples
module Proppatch
# RFC4918: 9.2.2
def self.rfc4918_9_2_2
<<~XML
<?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate xmlns:D="DAV:"
xmlns:Z="http://ns.example.com/standards/z39.50/">
<D:set>
<D:prop>
<Z:Authors>
<Z:Author>Jim Whitehead</Z:Author>
<Z:Author>Roy Fielding</Z:Author>
</Z:Authors>
</D:prop>
</D:set>
<D:remove>
<D:prop><Z:Copyright-Owner/></D:prop>
</D:remove>
</D:propertyupdate>
XML
end
end
end
end