W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2003

RE: Atomization Question...

From: Ranjeet Sonone <ranjeet@ipedo.com>
Date: Fri, 21 Feb 2003 18:24:36 -0800
Message-ID: <EFBAE6044AC0CD41981E01582A1E94AB1380B7@alibaba.ingine.com>
To: "Michael Burbidge" <mburbidg@adobe.com>, <www-ql@w3.org>

Atomic values make sense when there is a binding schema for the 
data being represented in XML.

Consider a schema that defines a complex type as follows:

<xs:complexType name="stock_quotes">
	<xs:sequence minOccurs="0" maxOccurs="unbounded">
		<xs:element name="value" type="xs:float"/>
	</xs:sequence>
	<xs:attribute name="symbol" type="xs:string" use="required"/>
</xs:complexType>

The purpose of this element is to give a sequence of stock quote value
for
some company over a period of time. Thus, there will be more than values
for this stock quote. Note that the primitive type float is used
for defining the data type of the element value.

A XML data instance of this schema would be as follows:

<stock_quotes symbol="abcd">
	<value>3.12</value>
	<value>4.23</value>
	<value>4.23</value>
	<value>2.35</value>
</stock_quotes>

An XQuery expression for such a snippet that gives you sequence of nodes
that contain atomic values could be as follows:

{-- Assuming that $stock_quotes contain the data as shown above --}

let $i := dm:document-node($stock_quotes)/value
return
$i

Thus, $i will return the sequence of atomic values.

The values in the sequence could further be restricted, by using the
restriction 
on the simple type used for defining the value type, but they still
qualify as atomic values
as restricted values would be a subset of the actual domain of values
for the 
primitive type.

helps?

-ranjeet







-----Original Message-----
From: Michael Burbidge [mailto:mburbidg@adobe.com]
Sent: Friday, February 21, 2003 5:23 PM
To: www-ql@w3.org
Subject: Atomization Question...



Under the definition of atomization the specification refers to a node 
whose type value is a sequence of atomic values. Can someone give me a 
snippet of XML that gives an example of a such a node?

Thanks,
Michael-
Received on Friday, 21 February 2003 21:25:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:18 GMT