W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > October to December 2003

RE: XML valued datatypes

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 8 Oct 2003 10:09:19 +0200
To: "Wallmer, Martin" <Martin.Wallmer@softwareag.com>, "'Julian Reschke'" <julian.reschke@gmx.de>, "Babich, Alan" <ABabich@filenet.com>, <www-webdav-dasl@w3.org>
Message-ID: <JIEGINCHMLABHJBIGKBCMEPHILAA.julian.reschke@gmx.de>
MessageHi.

Here's a minum approach that would be easy to implement on a XPath-enabled
backend:

- define a "xpath-match" operator in terms of XPath(1); context node would
be the property element, namespace prefixes would be inherited from query
context. It would behave just as xsl:if in XSL 1.0. Example:

  <xpath-match>
    <prop><resourcetype/></prop>
    <literal xmlns:D="DAV:">D:principal</literal>
  </xpath-match>

  matches ACL principals.

- sorting could be defined just like xsl:sort (and therefore would default
to the concatenated text content).

Dangers:

- soon, people will want more. XPath2 (datatyping), binding XPath variables,
putting expressions into sort definitions and so on.

I think the best way to proceed is that those who want/need this feature go
ahead and build a working prototype, collect experience and write down a
proposal. Right now I guess that as least 3 out of the 5 server implementors
I'm aware of will not be able to support this any time soon, though.

Julian
--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

  -----Original Message-----
  From: www-webdav-dasl-request@w3.org
[mailto:www-webdav-dasl-request@w3.org]On Behalf Of Wallmer, Martin
  Sent: Wednesday, October 08, 2003 9:19 AM
  To: 'Julian Reschke'; Babich, Alan; www-webdav-dasl@w3.org
  Subject: RE: XML valued datatypes


  Hello,

  querying XML documents is hard, if you store the properties in an SQL
based system, easy for an XML store. The server would somehow evaluate the
xpath expression, that is passed with that additional operator. XPath is
well defined, no need for extra spec work in this area. As sorting is not
defined in XPath, order could be UNDEFINED for XML valued properties as
well. Another option, order lexically by the value of their text nodes.
Currently properties with XML string values are sorted lexically, which does
not really make sense IMHO for XML.

  I don't see side effects for this topic, this operator would not make the
spec much more complex. If we leave this out for the time being, we should
keep it on the TODO list.

  We already implemented a similar thing, allowing XPath queries on XML
content, a somehow xml based <contains> operator.

  regards,
  Martin






   -----Original Message-----
  From: Julian Reschke [mailto:julian.reschke@gmx.de]
  Sent: Dienstag, 7. Oktober 2003 20:52
  To: Babich, Alan; Wallmer, Martin; Julian Reschke; www-webdav-dasl@w3.org
  Subject: RE: XML valued datatypes


    Actually,

    defining a single XPath-based operator probably *would* suffice (we'd
still need to find out how this affects result sorting, though). However I
agree with Alan that we should leave this out of the spec for now.

    Julian

    --
    <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

      -----Original Message-----
      From: Babich, Alan [mailto:ABabich@filenet.com]
      Sent: Tuesday, October 07, 2003 6:57 PM
      To: Wallmer, Martin; Julian Reschke; www-webdav-dasl@w3.org
      Subject: RE: XML valued datatypes


      Martin,

      Querying XML documents is a much bigger deal than inventing an
optional operator. There is a whole working group for XML query. Please
review what they have done.

      Alan Babich
        -----Original Message-----
        From: Wallmer, Martin [mailto:Martin.Wallmer@softwareag.com]
        Sent: Tuesday, October 07, 2003 3:29 AM
        To: 'Julian Reschke'; Wallmer, Martin; www-webdav-dasl@w3.org
        Subject: RE: XML valued datatypes


        So lets make it an optional operator

        Regards,
        Martin
          -----Original Message-----
          From: Julian Reschke [mailto:julian.reschke@gmx.de]
          Sent: Dienstag, 7. Oktober 2003 11:48
          To: Wallmer, Martin; www-webdav-dasl@w3.org
          Subject: RE: XML valued datatypes


          Martin,

          the simple answer is that DAV:basicsearch doesn't support queries
on properties that do not have a text content model. See
http://greenbytes.de/tech/webdav/draft-reschke-webdav-search-latest.html#non
-simple-types. So a server MUST NOT attempt to match in this case.

          So yes, a new operator that does XPath-based matching on a
property value may make a lot of sense, but of course it can't become a
required operator for DAV:basicsearch.

          Julian


          --
          <green/>bytes GmbH -- http://www.greenbytes.de --
tel:+492512807760

            -----Original Message-----
            From: www-webdav-dasl-request@w3.org
[mailto:www-webdav-dasl-request@w3.org]On Behalf Of Wallmer, Martin
            Sent: Tuesday, October 07, 2003 11:20 AM
            To: www-webdav-dasl@w3.org
            Subject: XML valued datatypes


            Hi,

            when we're talking about datatypes, what about xml value'd
properties?

            Example:

            You have two resources, one you PROPPATCHed with:

            <?xml version="1.0" encoding="utf-8"?>
            <D:propertyupdate xmlns:D="DAV:">
              <D:set>
                <D:prop xmlns:Z="http://www.w3.com/standards/z39.50">
                  <Z:authors>
                    <Z:Author>Jim Whitehead</Z:Author>
                    <Z:Author>Roy Fielding</Z:Author>
                    <Z:Co-author>Lieschen Mueller</Z:Co-author>
                  </Z:authors>
                </D:prop>
              </D:set>
            </D:propertyupdate>

            the second with

            <?xml version="1.0" encoding="utf-8"?>
            <D:propertyupdate xmlns:D="DAV:">
              <D:set>
                <D:prop xmlns:Z="http://www.w3.com/standards/z39.50">
                  <Z:authors>
                    <Z:Author>Lieschen Mueller</Z:Author>
                  </Z:authors>
                </D:prop>
              </D:set>
            </D:propertyupdate>

            How to find all resources, where Lieschen Mueller was author,
not Co-author? Currently you have to define something like:

            <like>
              <prop>
                <Z:authors/>
              </prop>
              <literal>%Lieschen Mueller%</literal>
            </like>

            but of course you will find both resources. Relying on
formatting won't work. So what about something like:

            <xpath>
              <prop>
                <Z:authors/>
              </prop>
              <literal>[Z:author="Lieschen Mueller"]</literal>
            </xpath>

            or finding all resources, where a Co-author is defined:

            <xpath-is-defined>
              <prop>
                <Z:authors/>
              </prop>
              <literal>./Z:Co-author</literal>
            </xpath-is-defined>

            where the literal is an xpath expression relative to the
property (root element).

            Regards,
            Martin

            __________________________
            Martin Wallmer
            Research & Development
            Software AG    ++49 6151 92 1831
            Uhlandstr. 12
            D 64297 Darmstadt
Received on Wednesday, 8 October 2003 04:09:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 22 March 2009 03:38:09 GMT