[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: How would you like a new axis? time::
Subject: Re: How would you like a new axis? time::|
From: ac <ac@xxxxxxxxxxxxx>
Date: Mon, 15 Mar 2010 05:36:45 -0400
The paper looks fine, yet still sketchy.
Managing node history implicitly seems more appropriate for XQuery
Update than for an immutable model like XSLT is currently using. That
is also how it is presented in the paper, a feature built for/with
XQuery Update. As for XSLT, at least currently, the explicit approach
seems more appropriate. Of course, unless XSLT starts supporting
mutable nodes, trees, forests ... What would be the WGs' views on this?
Clearly one can always design a data model in which history is modelled
explicitly, but the idea with temporal database work has always been that
everything has history and the system should take care of it automatically
(rather in the way that CVS or SVN always allows you to find the state of a
file at a given time in the past). So Dana's proposal is essentially to
allow you to query the historical states of any given node, without you
having to do anything explicit in your XML design to keep the history as
part of the active document.
Her description of the model at the conference was very much a sketch, I
don't know how much detail is fleshed out in the paper.
From: Mukul Gandhi [mailto:gandhi.mukul@xxxxxxxxx]
Sent: 14 March 2010 15:08
Subject: Re: How would you like a new axis? time::
On Sun, Mar 14, 2010 at 7:04 PM, Michael Kay
So how would you find a product element whose price todayis less than
its price a week ago?
I might, like to keep a sequence of "price" nodes for a
product, instead of only one price for a product. Each price
information can have an "effective" date.
Therefore, I might have a schema like following:
<xs:element name="name" type="xs:string" />
<xs:element name="price" maxOccurs="unbounded">
<xs:attribute name="effective" type="xs:dateTime" />
<xs:attribute name="ID" type="xs:string" /> </xs:complexType>
<xs:element name="product" type="Product" maxOccurs="unbounded" />
If the corresponding XML instance is like following:
<price effective="2010-03-14">10</price> </product>
I can get the products as you suggested, as follows:
//product[price[last()] lt price[last() - 1]]
This technique, doesn't use the creation& modification
dateTime's as I suggested initially, but this uses a custom schema.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format