XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] XML aggregation question?

Florent Georges wrote:
> Philippe Poulard wrote:
> 
> 
>>>  Mmh.  Saxon uses a standard XPath function that takes
>>>a URI as parameter.  I don't see what is not "à la
>>>XPath".  You use an unknown function.  They smell
>>>equally XPath IMHO.
> 
> 
>>Read again my first post : the purpose is neither the name
>>of the function nor about how to get the content of the
>>file
> 
> 
>   No.  You said "Saxon's syntax (sic) is not a la XPath,
> mine is".

I was pointing the part that was between the opening ' and the closing ' 
: everything within is a litteral ; you can still argue that a litteral 
is part of the XPath syntax, this is not the purpose here :p

> 
> 
>>My answer is : "why not using XPath everywhere in XML
>>applications ?"
> 
> 
>   Because we can use XML, also :-p.

Just use it !
http://reflex.gforge.inria.fr/

> 
> 
>>Pros :
>>-a single syntax
> 
> 
>   About syntax, the Saxon way *is* XPath, so nothing new.
> 
> 
>>-a well-known syntax
> 
> 
>   Yes, in both case.  In the other hand, one use a
> well-known function, the other not.

This is exaclty what I ask for.

> 
> 
>>>  BTW, how do you specify to recurse or not?
> 
> 
>>//* recurse
>>/* do not recurse
> 
> 
>>It's XPath
> 
> 
>   So you can't specify recurse or not.

I can.

   At least in XPath.
> The function *have* to recurse and construct a document
> containing information about all the subtree.

This would be a very bad strategy.


   What about:
> 
>     collection('file:///?select=*.xml;recurse=no')
> 
> vs/
> 
>     file('file:///')/*[matches(@extension, '\.xml$')]
> 
> if / contains recursively milions of files?

My implementation will only look at the first level of the tree without 
trying to descend inside the thousands subdirectories.

> 
> 
>>   And to validate or not?
> 
> 
>>What means "validating a file" ?
> 
> 
>   Not a file.  A document.  Remember we are speaking about
> collection(), and collection() retrieve documents.

Not at all : I left the context of the collection() function just to 
talk about handling files (see the example with Ant on my previous post)

XML files, text files, binary files

> 
> 
>>>And how do you get the actual content of the files?  Are
>>>they encapsulated directly in the result of file() (I
>>>hope they are not), or do you need a second function
>>>(something like open-file())?
> 
> 
>>Everything can be considered here ; have a look at
>>RefleX : there are
> 
> 
>   Mmh, I speak about the concrete example you gave us:
> file('...')//*[...].  You didn't say what file() returns.

I said previously an x-file object which is defined in the I/O module, 
so the type name is rather io:x-file (with the relevant namespace URI)

> It is a crucial point.

I'm sure you think that I handle something that return tags that can be 
parsed to a DOM etc ; it is not the case : I deal with something that 
mimick the infoset, which allows to avoid to deal with tags when they 
are not usefull. It's often the case and avoid round-tripping between 
tags and data models ; moreover, some objects would be useless in their 
tag forms ; for example, what is the XML (serialized) representation of 
an OutputStream or an InputStream (I'm not talking about the content, 
but of the object itself) ? It's completely irrelevant to consider such 
objects with a tag view.

The world of Active Tags handles XML objects, non-XML objects, and 
non-XML objects that behaves like XML objects (the last are called 
X-operable objects or cross-operable objects)
There is not necessary an XML document beyond a cross-operable object 
(example : io:x-file)
A non-XML object (not cross-operable) can be even build from an XML 
document (example : an XSLT stylesheet)

> 
> 
>>>  But your approach is interesting, IMHO, with optional
>>>arguments to specify switches, and assuming it returns
>>>only file infos, not actual content.
> 
> 
>>Of course, the content is returned only when it is
>>required
> 
> 
>   How it is required?

When you use it ; for example :
http://reflex.gforge.inria.fr/tutorial.html#N800FB4

> 
>   Regards,
> 
> --drkm
> 

Pfff, tu coupes vraiment les cheveux en 4, Florent...

-- 
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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS