logo       

Re: File Systems & XQuery: msg#00026

Subject: Re: File Systems & XQuery
On Wednesday 07 February 2007 16:24, Florent Georges wrote:
> Frans Englich wrote:
[...]

> > $fs/directory[@name =
>
> "home"]/directory[@name="frans"]/directory[@name="xmlExamples"]//*[@mimeTyp
>e eq 'application/xml']
>
>   I definitely prefer the Saxon way.
>
> > Is this idea overkill?
>
>   Maybe.  The Saxon default collection URI resolver is really great to
> use.  The question is: is there real use cases that legitimates all
> that?

One of those questions that are always sensible to ask.

Yes, I think that the general idea of file system inspection is useful. For 
example, I think you can build quite interesting -- and useful -- systems by 
combining quick document loading, clever document caching, and file system 
inspection. Perhaps Mike can provide examples, who actually has users using 
such a mechanism. But I agree that it so far hasn't been demonstrated why 
this would be justified in a broader perspective.

I think it's a good idea to get the different usage scenarios separated:

* When you know the URI at compile time and wants to iterate the files in that 
folder, or similar. For this case specifying the URI with a URI makes sense, 
and is why Saxon's approach is appealing here, and why using a namespace(and 
hence prefix in paths, as pointed out by John) and XPath-paths appear 
annoying. This is why a URI should be specified for whole paths, instead of 
things like "directory[@name="frans"]/..".

* When you need to query/select files. For this I think the XPath syntax is 
acceptable and provides the necessary functionality.

So, when using an extension function, it would instead look like this:

file-system("file:///home/frans/")/*[@name eq 'myFile.xml']

URIs for URIs, and XPath for querying. Sounds proper, at least.

Like this, the use of a namespace isn't very cumbersome. I'm still in favour 
of a namespace, such that it can be combined with other vocabularies, such as 
embedding it in other documents.


                Frans


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
region.costa-ri...    user-groups.lin...    lang.prothon.us...    xfree86.cvs/200...    finance.aqbanki...    ietf.smtp/1993-...    web.turbogears....    jakarta.cactus....    yellowdog.gener...    php.gtk+.genera...    org.region.indo...    hurd.l4/2005-10...    culture.religio...    apple.fink.gene...    db.mysql.window...    bluez.devel/200...    security.pgp-ba...    video.blender.d...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe