[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML aggregation question?

  • From: Philippe Poulard <Philippe.Poulard@xxxxxxxxxxxxxxx>
  • To: Michael Kay <mike@xxxxxxxxxxxx>
  • Date: Mon, 28 Aug 2006 14:53:51 +0200

xpath aggregation
Michael Kay wrote:
>>Based on all the comments thus far as well as reading some of 
>>the articles/documentation on eXist, it would seem that an 
>>XML database is really the only viable choice if I want to 
>>keep my data as XML and still provide aggregated views across 
>>the instances based on values of attributes (or other 
>>expressions using XPath and/or XQuery).
> 
> 
> 
> This isn't absolutely true. For example, the W3C XSLT test suite (not
> published, unfortunately) is a collection of over 5000 XML documents held in
> filestore, and it's quite feasible to run queries in Saxon (using either
> XSLT or XQuery) across this collection. For example, to count how many of
> the stylesheets in the collection specify version="1.0" on the
> xsl:stylesheet element, use:
> 
> count(collection('file:///c:/xslts_1_0_0/TestInputs?select=*.xsl;recurse=yes
> ')
>          [(xsl:stylesheet|xsl:transform)/@version='1.0'])
> 
> What you don't get with this approach is performance. There's no database
> load operation, so there are no collection-level indexes: the system works
> its way through the directory parsing and testing each individual document.
> But it's still very useful (and surprisingly fast) for the occasional ad-hoc
> search.
> 
> Michael Kay
> http://www.saxonica.com/
> 

hi,

Just a comment about the syntax :

-Saxon's syntax :
collection('file:///c:/xslts_1_0_0/TestInputs?select=*.xsl;recurse=yes')
-Ant's syntax :
<fileset dir="file:///c:/xslts_1_0_0/TestInputs" includes="**/*.xsl"/>
-Why not using definitively the XPath syntax ?
file('file:///c:/xslts_1_0_0/TestInputs')//*[ends-with(name(.),'xsl')])
or
file('file:///c:/xslts_1_0_0/TestInputs')//*[@extension='xsl']
or whatever à la XPath ?

The XPath syntax was adopted in Active Tags for many purposes : file 
systems, HTTP requests and responses, web cookies, etc ; the objects 
that are worth behaving like XML are very easy to handle : one can 
browse them with XPath and update them with something like XUpdate

One often say that :
-in Unix, everything is a file
-in OOP, everything is object
and now :
-in Active Tags, everything is XML
the last sentence should be "in XML-oriented programming, everything is 
XML", but it's not yet true ; I'm not sure that it will be true one day, 
but it is already true for Active Tags

-Active Tags :
http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/
-an example of XPath over filesystems :
http://reflex.gforge.inria.fr/tutorial.html#N800FB4

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.