Datatypes for WebDAV propertiesgreenbytes GmbHSalzmannstrasse 152MuensterNW48159Germany+49 251 2807760+49 251 2807761julian.reschke@greenbytes.dehttp://greenbytes.de/tech/webdav/
This specification extends the Web Distributed Authoring Protocol (WebDAV) to
support both datatyping and some amount of meta information on property values.
Protocol elements are defined to let clients and servers specify the datatype and
meta information of a property, and to
instruct the WebDAV method PROPFIND to return datatype and meta information.
Distribution of this document is unlimited. Please send comments to the
Distributed Authoring and Versioning (WebDAV) working group at w3c-dist-auth@w3.org, which may be joined by sending a message with subject
"subscribe" to w3c-dist-auth-request@w3.org.
Discussions of the WEBDAV working group are archived at URL:
http://lists.w3.org/Archives/Public/w3c-dist-auth/.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in .
The term "property element" refers to the XML element that identifies
a particular property, for instance
The term "prop element" is used for the WebDAV "prop" element as defined
in section 12.11 of .
The XML representation of schema components uses
a vocabulary identified by the namespace name "http://www.w3.org/2001/XMLSchema".
For brevity, the text and examples in this specification use the prefix "xs:"
to stand for this namespace; in practice, any prefix can be used.
"XML Schema: Structures" () also defines several
attributes for direct use in any XML documents. These attributes are in a
different namespace named "http://www.w3.org/2001/XMLSchema-instance".
For brevity, the text and examples in this specification use the prefix "xsi:"
to stand for this latter namespace; in practice, any prefix can be used.
This document defines extension elements and attributes that could ultimately become
part of the core WebDAV protocol. Being just an individual
submission, it currently defines them in the proprietary namespace
instead of the "DAV:" namespace. It uses a prefix of "pf:"
for referring to elements or attributes in this namespace. However, WebDAV server and clients
are free to use any prefix, provided that there is a namespace declaration that
binds the prefix to the URI of the same namespace.
This specification builds on the infrastructure provided by
the WebDAV Distributed Authoring Protocol, adding support for data-typed
properties, some property flags and display names for properties.
Although servers must support XML content in property values, it may be
desirable to persist values as scalar values when possible, and to expose
the data's type when the property value is returned to the client. The client
is free to ignore this information, but it may be able to take advantage of it
when modifying a property.
On the other hand, when setting new properties, it can be desirable to
pass data type information along with the value. A server can take advantage
of this information to optimize storage and to perform additional parsing (for
instance of dates). Servers that support searching can also take advantage
of known data types when doing comparisons and sorting.
Furthermore, it may be desirable to add some amount of additional meta
information to properties in order to enable generic WebDAV clients to
provide a meaningful user interface for editing these properties. In
particular, clients can take advantage of knowing that particular properties
are not generally suitable for edits through humans ("hidden"), or that
they can not be changed ("protected").
Finally, generic clients that allow editing of arbitrary properties need
to display a "display name" for each property. This document defines a new
protected live property, "pf:property-displayname-set", that provides this
information.
Although WebDAV property types can be anything that can be marshalled
as content of an XML element, in many cases they actually are simple
types like integers, booleans or dates. "XML Schema Part 2: Datatypes"
defines a set of simple types which can be
used as a basis for supplying type information to attributes.
Data type information is represented using the attribute "type" from the
XML Schema namespace "http://www.w3.org/2001/XMLSchema-instance".
In XML Schema, data types are qualified names, and the XML Schema
recommendation defines a set of built-in datatypes (section 3 of
), defined in the
namespace "http://www.w3.org/2001/XMLSchema".
To avoid unnecessary verbosity, data type information should only be
supplied if it adds usable information to the protocol. In particular,
type information is not required for live properties defined in
WebDAV and for properties of type
"xs:string".
A server may implement any combination of datatypes, both from the XML
Schema recommendation and possibly from other namespaces.
Note that a particular property can be typed for a number of reasons:
The property is a live property with server-defined semantics and
value space.The property may have been set using a non-WebDAV protocol that the
server understands in addition to WebDAV.The type may have been specified in an extended PROPPATCH method
as defined in .
This specification defines semantics for two specific property flags.
This is a (boolean) display hint for generic user agents. When set to "false", it
indicates that it is generally not useful to allow users to modify this
property.
When set to "true", this flag indicates that this property is protected (as
defined in , section 1.4.2). A user agent may display
this property, but should not allow edits on it.
For the purpose of marshalling property displayname information, this
specification introduces a new computed resource property. In accordance
to , this property SHOULD not returned upon
an PROPFIND/allprop request.
The pf:property-displayname-set contains display information about properties
defined on the resource. The set may not be complete (if the server doesn't
have display information for particular properties).
The DAV:prop element contains exactly one property element identifying the
resource property to which the pf:property-displayname element applies.
The pf:displayname element contains the display name for the property.
Servers MUST indicate the human language of the description using the xml:lang
attribute and SHOULD consider the HTTP Accept-Language request header when
selecting one of multiple available languages.
If the property element has an XML attribute named "xsi:type",
the server may use this information to select an optimized representation
for storing the property value. For instance, by specifying
a type as "xs:boolean", the client declares the property
value to be of type boolean (as defined in ).
The server may choose any suitable internal format for persisting this
property, and in particular is allowed to fail the request if the format
given does not fit the format defined for this type.
The server should indicate successful detection and parsing of the typed value
by setting the xsi:type attribute on the property element in the response
body (this implies that it should return a MULTISTATUS status code and
a <multistatus> response body).
In this cases, the xsi:type attribute on the element "Z:released" indicates
that the server indeed has understood the submitted data type information.
In this case the request failed because the supplied value "t" is not
a valid representation for a boolean value.
Note that similar error conditions can occur in the standard WebDAV protocol
even though no data type was specified: for instance, when a client tries to set
a live property for which only a certain value space is allowed.
In this case the request succeeded, but the server did not know how to
handle the data type "Z:custom". Therefore no data type information was
returned in the response body.
If the property element has an XML attribute named "pf:hidden", the server
should persist this as part of the property value.
On the other hand, an XML attribute named "pf:protected" SHOULD be ignored,
because protected properties MUST NOT be modifiable by PROPPATCH.
In this case the request failed because the supplied value "flase" is not
a valid value for pf:hidden.
PROPFIND is extended to return the data type information for properties
unless one of the following conditions is met:
The data type MUST be different from "xs:string" (because this can
be considered the default data type).The property's data type MUST not be defined in
(because these types are already well-defined).
This example shows that the property value "true" is returned with the
correct data type information, and that the server chose one of the two
possible representations defined in XML Schema. It also shows that
data type information is not returned for "D:getcontenttype", as this
property's data type is already defined in .
Marshalling of property flags is triggered by adding extension elements
to the PROPFIND request body accordingly.
Presence of a pf:include-hidden-flag element in the request body indicated that the
server SHOULD include the flag pf:hidden on all properties.
Presence of a pf:include-protected-flag element in the request body indicated that the
server SHOULD include the flag pf:protected on all properties.
This part of this specification does not introduce any new protocol elements, nor does
it change the informal WebDAV DTD. It merely specifies additional server
semantics for the case where clients submit additional data type information
in an attribute on the property element (previously undefined), and
adds an additional attribute on property elements upon PROPFIND.
Clients not aware of datatype handling should not supply the "xsi:type"
attribute on property elements (after all, this attribute belongs to the
XML Schema-Instance namespace which has been defined for exactly this
purpose). Old clients should also ignore additional attributes on
property elements returned by PROPFIND (and similar methods), although
the WebDAV specification only defines this behaviour for unknown elements
(and is silent about unknown attributes).
Servers not aware of datatype handling either drop the "xsi:type"
attribute, or persist it along with the property value. However, they
will never indicate successful parsing of the data type by returning
back the type in the response to PROPPATCH.
Property flags are only reported upon special request and thus are never
seen by old clients. The PROPFIND request body has been extended according
to the WebDAV XML extensibility rules defined in ,
section 14.
Clients not aware of property flags should not supply the attributes
on property elements. This follows from the property flag namespace being
controlled by the authors of this specification.
Servers not aware of property flags either drop them or persist them
along with the property value. No harm is done, unless the client supplied
erroneous values.
The introduction of new WebDAV properties does not affect compatibility with
existing implementations at all.
This proposal builds on , and inherits its
internationalizability.
This proposal does not introduce any new IANA considerations, since
it does not specify any new namespaces (in the general sense), but
merely uses existing ones.
To be supplied by the RFC Editor.
To be supplied by the RFC Editor.
This draft has benefited from thoughtful discussion by Stefan Eissing and
Eric Sedlar.
Key words for use in RFCs to Indicate Requirement LevelsHarvard University1350 Mass. Ave.CambridgeMA 02138- +1 617 495 3864-
General
keyword
In many standards track documents several words are used to signify
the requirements in the specification. These words are often
capitalized. This document defines these words as they should be
interpreted in IETF documents. Authors who follow these guidelines
should incorporate this phrase near the beginning of their document:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
RFC 2119.
Note that the force of these words is modified by the requirement
level of the document in which they are used.
Extensible Markup Language (XML) 1.0Textuality and Netscapetbray@textuality.comMicrosoftjeanpa@microsoft.comUniversity of Illinois at Chicago and Text Encoding Initiativecmsmcq@uic.eduSun Microsystemseve.maler@east.sun.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science545 Technology SquareCambridgeMA02139US+ 1 617 253 2613+ 1 617 258 5999timbl@w3.orghttp://www.w3c.orgXML Schema Part 1: StructuresUniversity of Edinburghht@cogsci.ed.ac.ukOracleDavid.Beech@oracle.com(for) Commerce Onemurray@muzmo.comLotus Development CorporationNoah_Mendelsohn@lotus.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science545 Technology SquareCambridgeMA02139US+ 1 617 253 2613+ 1 617 258 5999timbl@w3.orghttp://www.w3c.orgXML Schema Part 2: DatatypesKaiser Permanente, for Health Level SevenPaul.V.Biron@kp.orgMicrosoft, formerly of IBMashokma@microsoft.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science545 Technology SquareCambridgeMA02139US+ 1 617 253 2613+ 1 617 258 5999timbl@w3.orghttp://www.w3c.orgHTTP Extensions for Distributed Authoring -- WEBDAVMicrosoft Corporationyarong@microsoft.comDept. Of Information and Computer Science, University of California, Irvineejw@ics.uci.eduNetscapeasad@netscape.comNovellsrcarter@novell.comNovelldcjensen@novell.comVersioning Extensions to WebDAVRational Softwaregeoffrey.clemm@rational.comIBMjamsden@us.ibm.comIBMtim_ellison@uk.ibm.comMicrosoftckaler@microsoft.comUC Santa Cruz, Dept. of Computer Scienceejw@cse.ucsc.eduSimple Object Access Protocol 1.1DevelopMentordbox@develop.comIBMdavide@us.ibm.comMicrosoftgopalk@microsoft.comMicrosoftandrewl@microsoft.comLotus Development Corp.Noah_Mendelsohn@lotus.comMicrosoftfrystyk@microsoft.comMicrosoftsatisht@microsoft.comUserLand Software, Inc.dave@userland.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science545 Technology SquareCambridgeMA02139US+ 1 617 253 2613+ 1 617 258 5999timbl@w3.orghttp://www.w3c.org
As an example for more complex data types, this section shows marshalling
of array-typed properties as implemented in the WebDAV protocol adapters of
SAP Portal's Enterprise Portal System (release 5.0).
As XML Schema does not define simple types for arrays,
it builds on the predefined array types used in .
These in turn can be based on the simple types defined in XML Schema.
Note the following special properties of SOAP-encoded arrays:
They require an additional "arrayType" attribute to specify the array length
and the base type.The names of the individual children of the property element
aren't relevant as the type information is already encoded on the property
element itself. It is however recommended to use identical element names
for all array members.
Editorial fixes.
Changed examples to explicitly use utf-8 encoding for HTTP content type and
XML encoding.
Added example for marshalling array-typed properties.
Fix width of artwork for IETF compliance.
"Non-normative references" -> "Informative references".
Added marshalling for property flags such as "hidden" and "protected".
Moved array marshalling example into back section.
Added rational and description for pf:property-displayname-set.
Added acknowledgements section.
Replaced domain names in examples according to RFC2606:
"www.foo.com" by "example.org", "www.example.com" by "ns.example.org/standards/z39.50/standards/z39.50" and
"www.w3.com/standards/z39.50" by "ns.example.org/standards/z39.50".