Java Forum / General / March 2006
Don't you need an XML Virtual Machine ?
Philippe Poulard - 29 Mar 2006 13:11 GMT Hi,
RefleX is a Java tool that allows people that have no particular knowledge of Java to write smart programs entirely in XML. The concepts of native XML programming used in RefleX have been designed separately, so that other implementations on other platforms/languages can be considered. As the tags used are considered "active", the underlying concepts have been named "Active Tags". Programming in XML allows developers to efficiently produce batch scripts as well as Web applications. With Active Tags, you can dramatically decrease the number of lines you have to code.
RefleX 0.1.3, a general-purpose XML Virtual Machine, is available here : http://reflex.gforge.inria.fr/
In this release, you'll find tutorials for mapping SQL to arbitrary complex XML structures, and for experimenting the Active Schema Language
: express constraints on XML documents that you can't achieve with DTD, W3C XML Schema, neither Relax NG, and define custom semantic data types.
Enjoy !
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Roedy Green - 29 Mar 2006 20:44 GMT On Wed, 29 Mar 2006 14:11:35 +0200, Philippe Poulard <Philippe.PoulardNO@SPAMsophia.inria.fr> wrote, quoted or indirectly quoted someone who said :
>RefleX is a Java tool that allows people that have no particular >knowledge of Java to write smart programs entirely in XML That strikes me as like saying "X is is a tool for people who have not yet learned to drive to drive blindfolded encased in bubblewrap." XML adds many level of DIFFICULTY. Look at ant. Even the simplest things become hideously awkward.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Daniel Dyer - 29 Mar 2006 21:29 GMT > On Wed, 29 Mar 2006 14:11:35 +0200, Philippe Poulard > <Philippe.PoulardNO@SPAMsophia.inria.fr> wrote, quoted or indirectly [quoted text clipped - 6 lines] > adds many level of DIFFICULTY. Look at ant. Even the simplest things > become hideously awkward. I am stumped trying to find a problem that this would solve.
Now what we really need is a mark-up format for XML, so we don't have to write XML directly. Here's a first stab:
[Element name="myElement"] [Attribute name="myAttribute" value="myValue" /] [Content]My textual content.[/Content] [/Element]
This would could then be compiled into the native XML. This approach neatly decouples the document mark-up from the concrete implementation of the mark-up language, allowing the data to me compiled to any heirarchical, text-based mark-up language that you chose. Here's how the XML output might look:
<myElement myAttribute="myValue"> Please somebody stop this nonsense. </myElement>
Dan.
 Signature Daniel Dyer http://www.dandyer.co.uk
James McGill - 29 Mar 2006 22:41 GMT > [Element name="myElement"] > [Attribute name="myAttribute" value="myValue" /] > [Content]My textual content.[/Content] > [/Element] I know you're joking, but I've seen meta-markup that was just as silly, in a serious context.
Oliver Wong - 29 Mar 2006 23:21 GMT > Now what we really need is a mark-up format for XML, so we don't have to > write XML directly. Here's a first stab: [quoted text clipped - 13 lines] > Please somebody stop this nonsense. > </myElement> Yes, but then someone would have to actually LEARN your meta markup language. We should have a descriptive language which allows you to define the syntax for your language, and it should look as much like plain English as possible, so that anybody could read it. We'd start off with an identification division, so that we could uniquely refer to these template languages for maximum re-use, then describe the encoding that the file uses so that parsers could... well... parse them.
000100 IDENTIFICATION DIVISION. 000200 TEMPLATE-ID: DanielDyerMarkupLanguage. 000300 AUTHOR: Daniel Dyer, Oliver Wong. 000400 ENVIRONMENT DIVISION. 000500 SOURCE-ENCODING: ASCII. 000600 LINE-ENDINGS: Unix. 000650 FILENAME-EXTENSION: ".ddml". 000700 MAIN-DESCRIPTION DIVISION. 000800 CASE IS: Significant. 000900 WHITESPACE IS: Insignificant. 001000 TAG-OPENING-STRING IS "[". 001100 TAG-CLOSING-STRING IS "]". 001200 TAG-END-MARKER IS "/". 001300 SHORT-CUT-TAGS ARE Allowed. 001400 ELEMENT-STRING IS "Element". 001500 ATTRIBUTE-STRING IS "Attribute". 001600 NAME-ATTRIBUTE-STRING IS "name". 001700 VALUE-ATTRIBUTE-STRING IS "value". 001800 CONTENT-STRING IS "Content". 001900 END-MARKUP-DESCRIPTION.
There, now people (and more importantly, computers) can understand how to use your generic markup language! The line numbers are present so that copy-and-pasting code snippets in the wrong order can be detected and rectified. The practice is to increment them by 100s, in case you need to later insert a line (as I have done so; can you spot where?)
I wasn't sure if you intended for your markup language to be case sensitive or not, so I arbitrarily guessed that it was.
- Oliver
Philippe Poulard - 30 Mar 2006 15:42 GMT >> Now what we really need is a mark-up format for XML, so we don't have >> to write XML directly. Here's a first stab: [quoted text clipped - 53 lines] > > - Oliver SGML already did it like this before ;) XML brought simplicity to SGML : there are no options like those above, all is hard-coded in the spec ; it just remains the syntax, tags
But RefleX is not a question of syntax, it's a question of features ; I didn't want another language that makes the stuff like others, I wanted a language that of course has the characteristics of programming languages, but that also could make things differents : -allow to mix declarative-oriented sentences with imperative instructions -allow to consider some objects like XML-friendly objects in order to apply XPath expressions on them, and apply XUpdate-like operations to modify them -etc
the result is that when we designed a complete application with RefleX which is in production today at INRIA, we did it with few tags (about 10% of the lines of codes that we should have to produce with Java), despite the intrinsic verbosity of XML
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Chris Uppal - 30 Mar 2006 17:21 GMT > the result is that when we designed a complete application with RefleX > which is in production today at INRIA, we did it with few tags (about > 10% of the lines of codes that we should have to produce with Java), > despite the intrinsic verbosity of XML What did you use to edit the XML ? (Genuinely curious).
-- chris
Philippe Poulard - 30 Mar 2006 18:01 GMT >>the result is that when we designed a complete application with RefleX >>which is in production today at INRIA, we did it with few tags (about >>10% of the lines of codes that we should have to produce with Java), >>despite the intrinsic verbosity of XML > > What did you use to edit the XML ? (Genuinely curious). a text editor...
for long times I have experimented SGML/XML editors, but they are suitable for end-users ; developpers only need colour-syntaxic and a smart way to close open tags : that's enough for me
I intend -one day, surely- to design the ultimate XML editor ;)
> -- chris
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Chris Uppal - 30 Mar 2006 08:59 GMT > I am stumped trying to find a problem that this would solve. I think the idea is that it /causes/ the problems...
> [Element name="myElement"] > [Attribute name="myAttribute" value="myValue" /] > [Content]My textual content.[/Content] > [/Element] [Grin/]
-- chris
James McGill - 29 Mar 2006 22:44 GMT > That strikes me as like saying "X is is a tool for people who have not > yet learned to drive to drive blindfolded encased in bubblewrap." XML > adds many level of DIFFICULTY. Look at ant. Even the simplest things > become hideously awkward. I disagree, for ant, except in degenerate cases where the project is simpler than the build script.
Now, XSLT functions. Iterating through a data structure, sorting, searching, formatting, that sort of thing in XSLT is always a nightmare.
Philippe Poulard - 30 Mar 2006 15:31 GMT > On Wed, 29 Mar 2006 14:11:35 +0200, Philippe Poulard > <Philippe.PoulardNO@SPAMsophia.inria.fr> wrote, quoted or indirectly [quoted text clipped - 6 lines] > That strikes me as like saying "X is is a tool for people who have not > yet learned to drive to drive blindfolded encased in bubblewrap." I mean : people that have a knowledge of computer sciences can use RefleX even if they don't know Java, because entire applications can be written exclusively with tags in RefleX. But if you want to embed some existing Java classes, you're welcome !
XML
> adds many level of DIFFICULTY. Look at ant. Even the simplest things > become hideously awkward.
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Roedy Green - 30 Mar 2006 19:01 GMT On Thu, 30 Mar 2006 16:31:57 +0200, Philippe Poulard <Philippe.PoulardNO@SPAMsophia.inria.fr> wrote, quoted or indirectly quoted someone who said :
>I mean : people that have a knowledge of computer sciences can use >RefleX even if they don't know Java, because entire applications can be >written exclusively with tags in RefleX. But if you want to embed some >existing Java classes, you're welcome ! Which is obviously far more awkward than coding in Java.
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Roedy Green - 30 Mar 2006 19:05 GMT On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or indirectly quoted someone who said :
>>I mean : people that have a knowledge of computer sciences can use >>RefleX even if they don't know Java, because entire applications can be >>written exclusively with tags in RefleX. But if you want to embed some >>existing Java classes, you're welcome ! > >Which is obviously far more awkward than coding in Java. For example, show the following piece of Java code in XML
if ( s.endsWith( ".txt ) && s.length() > 5 ) { System.out ( s + " is a text file" ); } else { s = null; }
 Signature Canadian Mind Products, Roedy Green. http://mindprod.com Java custom programming, consulting and coaching.
Oliver Wong - 30 Mar 2006 19:48 GMT > On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green > <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or [quoted text clipped - 17 lines] > s = null; > } Isn't that a single instruction?
<testIsTextFileByExtensionAndEmitToConsoleElseSetToNull ref="s"/>
Actually, I took a look at their site, and the language does not look much easier to learn than Java, though it is quite concise for writing of web apps. Personally, I find declarative programming confusing, and prefer procedural, so I'd use PHP over this RefleX language, if I wanted to write up a quick and dirty web app, but maybe that's just my personal opinion.
To the OP, I don't think you should market this as "easier to learn than Java", especially in this newsgroup, because most people here already KNOW Java, and so the "barrier of learning Java" isn't even an issue for them. Look for other strengths in the product, and focus on those instead.
- Oliver
Philippe Poulard - 31 Mar 2006 08:36 GMT >> On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green >> <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or [quoted text clipped - 21 lines] > > <testIsTextFileByExtensionAndEmitToConsoleElseSetToNull ref="s"/>
:) possible, although very useless
> Actually, I took a look at their site, and the language does not look > much easier to learn than Java, though it is quite concise for writing > of web apps. Personally, I find declarative programming confusing, and > prefer procedural, so I'd use PHP over this RefleX language, RefleX in not a language, it's an engine where several XML languages can be run
I called this executable XML "Active Tags" ; Active Tags just specifies a behaviour, not how you could implement it
if I wanted
> to write up a quick and dirty web app, but maybe that's just my personal > opinion. [quoted text clipped - 4 lines] > issue for them. Look for other strengths in the product, and focus on > those instead. it's not a barrier, as you can also use Java if you like, but you're true, it's better to focus on RefleX's strengths ; there are many reasons for which you should prefer Active Tags instead of other similar technologies like PHP/ASP/JSP/Cocoon/etc :
-those mentioned above are all dedicated to a Web environment, whereas RefleX can run XML programs in a Web environment as well as from the command-line
-try to define a schema language with any of them ; it wouldn't be obvious (at best), or would be simply impossible (at worst) ! RefleX embeds one called the Active Schema Language, which goes a step further than DTD, W3C XML Schema, and Relax NG (for example, ASL allows to design dynamic content models and design semantic data types)
-there are also some smart features in Active Tags not available with its competitors : in Active Tags you can consider some non-XML objects as XML-friendly : use XPath to access them and apply XUpdate-like operations to modify them
-programs written with Active Tags (that are called Active Sheets) can dramatically decrease the amount of code to produce (we used it in a production environment at INRIA for a real application, and estimate that the number of lines to code was reduced to 10% (comparison with the hypothetic lines of Java to write))
-you can extend Active Tags with custom modules (libraries) ; you can design declarative-oriented grammar -which are very concise and expressive- and make them runnable within RefleX ; RefleX also allows to switch from declarative sentences to imperative instructions when you have reached the intrinsic limits of the declarative grammar
-RefleX is self-descriptive, it is built upon itself : any built-in or custom module is an application of RefleX ; Active Tags foundations are very sane, based on the cooperation of few core modules, each focusing on a single well-defined problematic
-you can define custom tags and functions with other tags (a kind of macro mechanism)
-Active Tags is easy to use and easy to learn : what you need is only a knowledge of computer sciences in general, XML + namespaces + XPath ; Active Sheets are easy to read
-you can design entire applications with RefleX without writting any Java code ; but you can also embed your own Java classes
-etc
now, Active Tags is very young, but it certainly bring some renewal in XML technologies
I'm aware that Active Tags looks like JSP, JSTL/taglibs, XSLT, Ant, Jelly, XMLBeans, Cocoon, etc ; I even hope that everyone recognize a little of each in Active Tags, because Active Tags is a kind of "all-in-one"
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Oliver Wong - 31 Mar 2006 16:18 GMT > it's not a barrier, as you can also use Java if you like, but you're true, > it's better to focus on RefleX's strengths ; there are many reasons for [quoted text clipped - 4 lines] > RefleX can run XML programs in a Web environment as well as from the > command-line I don't know about the others, but you can also run PHP from the command line. Also, from my understanding, RefleX programs always emit XML documents as output. Is this correct? If not, you may wish to update the tutorial (or "Hello World" example) on your site to clarify this.
<groupOfFeatures>
> -try to define a schema language with any of them ; it wouldn't be obvious > (at best), or would be simply impossible (at worst) ! RefleX embeds one [quoted text clipped - 15 lines] > -you can define custom tags and functions with other tags (a kind of macro > mechanism) </groupOfFeatures>
I've grouped the above features together because, to me, they are abstract, hard to understand, and it's not clear to me why they would help me write programs faster. I think you should provide a concrete scenario that a programmer might find themselves in, and then show what they might do if they were using Java (if posting to a Java group; replace with some other language if posting to a different group), and then compare what they would do in RefleX, to show why RefleX is better.
For example, when you write "Try to define a schema language with any of them", I think "Gee, when was the last time I was coding this Java application, and I *really* wished I could define my own schema language?" and the answer seems to be very rarely. So when I read about this "feature" in RelaX, I'm thinking "It looks like this product solves a problem that I don't have".
BTW, I'm not trying to be argumentative for the sake of arguing; rather, I'm just trying to point out why the features of RelaX, as they have been presented so far, might not be so appealing. I'm doing this because if RelaX actually does turn out to be a decent time-saving tool, I'd like to know about it. So I'm trying to give you a chance to illustrate all the strengths of RelaX.
> -programs written with Active Tags (that are called Active Sheets) can > dramatically decrease the amount of code to produce (we used it in a > production environment at INRIA for a real application, and estimate that > the number of lines to code was reduced to 10% (comparison with the > hypothetic lines of Java to write)) This is somewhat a weak argument, because we might suspect you of just being a sloppy Java programmer. The example you posted in another branch of this thread (recursively list all text files in a subdirectory which is not in /WEBINF/) was a very good one, as it does seem shorter in Active Tags than in Java. You should stick to concrete examples like these whenever possible.
> -there are also some smart features in Active Tags not available with its > competitors : in Active Tags you can consider some non-XML objects as > XML-friendly : use XPath to access them and apply XUpdate-like operations > to modify them Okay, this sounds handy. I saw you gave an "XML-like" view of the OS file system. What other kind of objects can you provide an XML-like view of?
> -Active Tags is easy to use and easy to learn : what you need is only a > knowledge of computer sciences in general, XML + namespaces + XPath ; > Active Sheets are easy to read This claim is also weak, after having looked at your sample code. I'm fairly comfortable with Computer Science, XML and XPath, but I had a lot of difficulty understanding the code posted on your site. It actually looks like there's some other language embedded within the attributes and contents of the XML, and THAT'S the programming language in which the behaviour of the application is encoded, rather than in the XML itself.
For example, when you have a node like:
<rdbms:connect name="db" url="{ string( $web:application/@web:init-param/@db-url ) }"/>
I'm wondering how many of those are keywords that I have to memorize, and how many of them are names that were defined elsewhere (perhaps in some external/included file?). Your tutorial needs a lot of work in this direction. Right now it's almost "copy and paste these programs, and you'll see these results", rather than "here's the structure of an ActivePage program, and here's what all the instructions do".
> -you can design entire applications with RefleX without writting any Java > code ; but you can also embed your own Java classes This might be best for someone transitioning from Java to RefleX. Can you show some concrete examples of these as well? Maybe given an example scenario of where a Java programmer can write, say, 99% of his or her application in Java, but then use a bit of RefleX to handle the cases where RefleX excels at? The AspectJ tutorials that are out there take a similar approach: They show how a cautious Java programmer can "test the waters" with AspectJ, before diving in completely.
- Oliver
Philippe Poulard - 31 Mar 2006 17:48 GMT Hi Oliver,
>> it's not a barrier, as you can also use Java if you like, but you're >> true, it's better to focus on RefleX's strengths ; there are many [quoted text clipped - 9 lines] > XML documents as output. Is this correct? If not, you may wish to update > the tutorial (or "Hello World" example) on your site to clarify this. RefleX can emit zero or several XML documents as output
> <groupOfFeatures> > [quoted text clipped - 33 lines] > language?" and the answer seems to be very rarely. So when I read about > this "feature" in RelaX, ^^^^^ it's RefleX, RelaX is something else ;)
I'm thinking "It looks like this product solves
> a problem that I don't have". XML is good for designing a language that can achieve specific tasks ; if you do it declaratively, you will be able to express big complex ideas very concisely ; there are lots of examples in this world today, for example a web.xml deployment descriptor is such a language, an XML catalog language is another, and W3C XML Schema yet another. But all declarative grammar has its intrinsic limits ; it is still possible to add a new tag, but you just go a little step further, the limit is not so far, and sooner or later, reached. Each tag is like a component that uses sub-tags, that is to say a sub-component ; an XML document is just a hard-coded description of the way one need to plug the components. With Active Tags, you have means to design powerfull declarative dialects that can be mixed with imperative instructions ; this is very usefull to use a simple if-then-else statement just to switch from one component to another. Then the components assembly becomes dynamic. That's also why it's called *Active* Tags.
It's certainly difficult to understand, that's why I demonstrate all that stuff with a declarative language that people should easily understand : a schema language. Example. "My <foo> element is a sequence of <bar> then <foo>, optional" To define this content model, the following declaration may be used : <element name="foo"> <sequence> <element ref="bar"> <element ref="foo" minOccurs="0"> </sequence> </element> ...which is something that you can design in W3C XML Schema or Relax NG (the syntaxic questions are ignored here). Both are declarative languages design to express constraints on XML documents. Now, if in fact my constraints are : "My <foo> element is a sequence of <bar> then <foo> (optional) except if the age of the captain is greater than 22, then the sequence is <FOO> then <BAR> (optional)", you can write it like this : <element name="foo"> <if test="$age-of-the-captain > 22"> <then> <sequence> <element ref="bar"> <element ref="foo" minOccurs="0"> </sequence> </then> <else> <sequence> <element ref="FOO"> <element ref="BAR" minOccurs="0"> </sequence> </else> </if> </element> But you can't do it with W3C XML Schema neither Relax NG, you can do it with the Active Schema Language
at runtime, the content model will be resolved to this one : <element name="foo"> <sequence> <element ref="bar"> <element ref="foo" minOccurs="0"> </sequence> </element>
or this one : <element name="foo"> <sequence> <element ref="FOO"> <element ref="BAR" minOccurs="0"> </sequence> </element> and each time the conditional branch is reached, it will be evaluated to a possible different content model
Now, consider that your problem is not to design a schema language, but to design a software where different parts can be assembled according to a configuration file ; you may think that XML is suitable for this purpose, like other people think it was for a web.xml deployment descriptor, an XML catalog language, and the W3C XML Schema language. The paradigm of the hard-coded XML file will apply to your application : one day, you'll find that on a given branch in the XML configuration file, you would like to use a simple if-then-else statement to select a component or another.
So, when I ask : is it possible to design a schema language, I'm sure it's not your need, but it demonstrates that : -a declarative grammar can be considered with Active Tags, whereas the other competitors are not design for this purpose -you can implement it in the dynamic way This is a great strength in Active Tags.
Thus, if you have to expose your Java code as tags, do it as active tags, it's worth to use RefleX.
> BTW, I'm not trying to be argumentative for the sake of arguing; > rather, I'm just trying to point out why the features of RelaX, RefleX ;)
as they
> have been presented so far, might not be so appealing. I'm doing this > because if RelaX actually does turn out to be a decent time-saving tool, [quoted text clipped - 13 lines] > in Active Tags than in Java. You should stick to concrete examples like > these whenever possible. There are some here : http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/active-tags/active-t ags.html#N40041D Certainly more suitable for a step by step understanding than using the tutorials.
>> -there are also some smart features in Active Tags not available with >> its competitors : in Active Tags you can consider some non-XML objects [quoted text clipped - 4 lines] > file system. What other kind of objects can you provide an XML-like view > of? I don't think that *all* objects have to be accessible with XPath, it would be somewhat useless although easily possible with introspection.
I prefer to focus on those that are really usefull ; for example, I find convenient for an HTTP response to expose some of its properties as XML attributes. However, there are no restriction on which object have to be and which mustn't be XML-friendly. Design it like you want (there is an interface for this purpose).
>> -Active Tags is easy to use and easy to learn : what you need is only >> a knowledge of computer sciences in general, XML + namespaces + XPath [quoted text clipped - 18 lines] > you'll see these results", rather than "here's the structure of an > ActivePage program, and here's what all the instructions do". There are comments in the code, and links below the code ; if you read the tutorial step by step, there is a link and an explanation for each new item <rdbms:connect>, $web:application etc. If you don't find any, it is because it was done before, or because I miss it :(
Moreover, there is a link to the material reference at the top of the tutorial, which will lead you here : http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/_/references.html
>> -you can design entire applications with RefleX without writting any >> Java code ; but you can also embed your own Java classes [quoted text clipped - 4 lines] > application in Java, but then use a bit of RefleX to handle the cases > where RefleX excels at? I will think about it, but making tutorials and how-to is time-consuming, and I do my best !
For the moment, there is only the "how-to" section : http://reflex.gforge.inria.fr/how-to.html
If you really want to try RefleX with your own Java app, please let me know, I'll try to help you ;)
The AspectJ tutorials that are out there take a
> similar approach: They show how a cautious Java programmer can "test the > waters" with AspectJ, before diving in completely. > > - Oliver Thanks for your comments.
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Philippe Poulard - 31 Mar 2006 08:25 GMT > On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green > <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or [quoted text clipped - 17 lines] > s = null; > } I'm sure Java is better to deal with such low-level problems...
Now, let's reverse the question, for example :
consider that $dir handles a directory on any filesystem (local, webdav, ftp, xmldb, zip, tar, jar...) in RefleX you can use XPath to select files
-recursively under the tree : $dir//*
-that are only files : $dir//*[@io:is-file]
-which ends with 'txt' $dir//*[@io:is-file][@io:extension='txt']
-who are not under a parent directory named 'WEB-INF' $dir//*[@io:is-file][@io:extension='txt'][name(..)!='WEB-INF']
Now, do the same with Java ^^
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Wibble - 31 Mar 2006 13:18 GMT >> On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green >> <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or [quoted text clipped - 38 lines] > > Now, do the same with Java ^^ What does this have to do with XML? Don't you just need a java library with that interface? A file system agnostic directory class would be nice.
And how is
> $dir//*[@io:is-file][@io:extension='txt'][name(..)!='WEB-INF'] something a non-programmer can write?
Dont confuse terse with simple.
Philippe Poulard - 31 Mar 2006 14:02 GMT >>> On Thu, 30 Mar 2006 18:01:04 GMT, Roedy Green >>> <my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or [quoted text clipped - 40 lines] >> > What does this have to do with XML? XPath is somewhat tightly related to XML :)
Don't you
> just need a java library with that interface? RefleX is such a library
> A file system agnostic directory class would be > nice. [quoted text clipped - 4 lines] > > something a non-programmer can write? RefleX is not a tool for end-users
> Dont confuse terse with simple. If you know XPath and XML, it will be easy to understand programs written with Active Tags
 Signature Cordialement,
/// (. .) --------ooO--(_)--Ooo--------
| Philippe Poulard | ----------------------------- http://reflex.gforge.inria.fr/ Have the RefleX !
Thomas Weidenfeller - 30 Mar 2006 07:46 GMT > Subject: Don't you need an XML Virtual Machine ? Ah, a solution in search of a problem.
/Thomas
 Signature The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|