I think they probably would go the route of turning XPath 2.0 one of the legs of X#, C# being the other. That would make possible to do things like.

for a xml with this form

<RedCarpet>
<Channel name="Mandrake9.0">
<Item id="11" Name="gnome-libs.i586mdk.rpm" currentVersion="2.01.333" .../>
<Item id="11" Name="gnome-vfs.i586mdk.rpm" currentVersion="2.01.23" .../>
</Channel>
<Channel name="RedHat8.0">
<Item id="11" Name="gnome-libs.i386.rpm" currentVersion="2.01.334" .../>
<Item id="11" Name="gnome-vfs.i386.rpm" currentVersion="2.01.23" .../>
</Channel>
</RedCarpet>

a visual form, would have such X# code (just my guess):

class formUpgrades : System.Windows.Forms
{
Datagrid dtgUpgrades;

...

public void ShowMeUpgrades(string channel)
{
XML localList = new XML("file:///etc/redcarpet/redcarpet.xml");
XML list = new XML("http://www.ximian.com/redcarpet.xml";);
Sequence seq = list.Channel[@name == channel];
Sequence seqLocal = localList.Channel[@name == channel]
if (seq.count > 0)
{
dtgUpgrades.DataSource = seq.Item[@currentVersion > max(seqLocal.ItemLocal.currentVersion[@id == current().@id])];
}
}
}

The above example, is similar to such an SQL query with subquery, being bound to a Datagrid:

SELECT * FROM RedCarpetItem INNER JOIN RedCarpetChannel ON RedCarpetItem.ChannelID = RedCarpetChannel.ID WHERE
RedCarpetChannel.Name = '@channel' AND RedCarpetItem.CurrentVersion > (SELECT MAX(CurrentVersion) FROM LocalItem INNER JOIN LocalChannel ON LocalItem.ChannelID = LocalChannel.ID WHERE LocalChannel.Name = '@channel' AND ID = RedCarpetItem.ID)

But RedCarpetItem and RedCarpetChannel tables, would have to be remote tables...

Interesting possibilities...

Rafael Teixeira
Brazilian Polymath
Mono, MonoQLE Hacker



_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup


_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to