W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2002

Re: [public-qt-comments] <none>

From: Jonathan Robie <jonathan.robie@datadirect-technologies.com>
Date: Tue, 20 Aug 2002 11:46:30 -0400 (EDT)
Message-Id: <>
To: Fei Sha <Fei.Sha@prism.uvsq.fr>, public-qt-comments@w3.org

At 12:34 PM 8/19/2002 -0400, Fei Sha wrote:

>in the document: "XML Query Use Cases  W3C Working Draft 16 Aug 2002"
> Q7
>$b/@year is interpreted as an attribute of the <book>


> Q6
>List the short titles of all sections (the values of the "shorttitle" 
>attributes of all "section" elements, expressing each short title as the 
>value of a new element.)
>If I interprete "...each short title as the value of a new element"
>The result should be:
><stitle>What is markup?</stitle>
><stitle>What is SGML?</stitle>
><stitle>How does SGML work?</stitle>
>Is this interpretation correct?

The text is misleading. The query would actually return:

<stitle shorttitle="What is markup?"/>
<stitle shorttitle="What is SGML?"/>
<stitle shorttitle="How does SGML work?"/>

The query could have been written differently to produce the result you 
give, eg:

   for $s in input()//section/@shorttitle
   return <stitle>{ string-value($s) }</stitle>

I will change either the query or the text for the next Working Draft.

>What is the expected result of the query:
>     for $y in document("www.bn.com/bib.xml")//book/@year
>     return $y

Our answers to use  cases are generally presented as serialized XML text, 
but not every instance of the data model can be serialized as well-formed 
XML. In this case, you have a sequence of attributes, which is a perfectly 
valid query result, but can not be serialized as an XML document. That's 
why we put the attributes into elements in the query in Q6.

Received on Tuesday, 20 August 2002 12:06:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:43 UTC