World: r3wp
[XML] xml related conversations
older newer | first last |
Maxim 20-Apr-2006 [400] | anyone know if any XML Schema integration has been done in REBOL? |
[unknown: 9] 21-Apr-2006 [401] | We have done a little in Qtask. WE save the tasks as XML (and call it XLS so that Excel can load it). We will be writing an RSS reader soon. |
Graham 25-Apr-2006 [402x4] | there's a new script in the library %rebelxml.r ( not sure why it isn't rebolxml.r ) |
what's the difference between RebXML, and rebelxml and other implementations? | |
which is best to use? | |
( I know nothing really of XML .. just know I have to parse some data, and rewrite out my data as xml ) | |
Maxim 25-Apr-2006 [406] | I'm using rebxml as the loader and then write a dialect over it to convert to my preffered (easier to use) block format. |
Graham 25-Apr-2006 [407] | what do think of this new script ? |
Maxim 25-Apr-2006 [408x3] | Its news to me, but in my useage, Its easier for me to have rebol loaded blocks, cause I can use path notation directly, in order to access the data, just as if they where objects. |
I must admit that just by looking at the docs, I prefer Geomol's solution better, its more approachable. | |
that's my 2 cents. and a 2 minute overlook of rebelxml.r | |
Graham 25-Apr-2006 [411] | Where's your script ? :) |
Maxim 25-Apr-2006 [412x2] | rebxml can be found here, with docs :-) http://home.tiscali.dk/john.niclasen/rebxml/ |
also, although I have not looked at rebelxml in this regard, rebxml handles many of the xml idiosyncracies in the XML specification like empty tags, CDATA blocks, and some level of character conversion to handle unicode and & escaped chars. | |
Geomol 26-Apr-2006 [414] | Great to see my work is being used! :-) |
Joe 26-Apr-2006 [415] | How does rebxml compare to gavin withead xml-parser.r ? |
Maxim 26-Apr-2006 [416] | its easy to use? and will get your job done within minutes of trying. ;-) |
Joe 26-Apr-2006 [417] | I used Gavin's code in the past and found very complete and useful, specially when using xml-object.r |
Maxim 26-Apr-2006 [418] | it seems powerfull, but I had a hard type getting it to work. I WAS pressed for time though. |
Gabriele 27-Apr-2006 [419x3] | speaking of XPath (Reichart's msg on Altme group), I wonder if there's need for it in the community? |
1) people want XSLT and XPath in rebol, because it's the standard and so on. 2) people want a dialect that offerst XSLT/XPath-like functionality to work on REBOL trees (as opposed to XML) 3) noone cares about representing data as trees in REBOL because dialects are much better anyway | |
(pick your choice :) | |
yeksoon 27-Apr-2006 [422] | why not post this on REBOLTalk.com forum as a poll? have AltMe, ML user participate in this poll |
Gabriele 27-Apr-2006 [423] | i'm just trying to get some ideas. not a real poll. but maybe we can post this on reboltalk too. |
Sunanda 27-Apr-2006 [424] | I'd lead towards 3. But that's because I heft XML into REBOL objects and fiddle with it from there. That gets away from the strict hierachy of XML, so I don't need to think about basically insane things like XSLT's axis processing |
Maxim 27-Apr-2006 [425x3] | and we already have data as trees in rebol, nested blocks and objects... so I don't think its going to help much. |
although getting XML:schema LOAD/SAVE , complete, native XML 1.0 LOAD/SAVE that would at least allow us to start using XML in the first place ;-) | |
so my vote 3) | |
Gabriele 27-Apr-2006 [428] | we already have data as trees - if you use that, then tree rewriting would be very useful for you, wouldn't it? |
Maxim 27-Apr-2006 [429] | can you further define "tree rewriting" |
yeksoon 27-Apr-2006 [430] | does having XSLT also means we can map that into /View? |
ScottT 27-Apr-2006 [431] | well, if you can write a stylesheet that outputs a layout. Not at all impossible, <xsl:output method="text" /> |
Gabriele 28-Apr-2006 [432x3] | max: tree rewriting is the technique that compilers use to get from the source AST to the final machine code; you can also imagine purely functional languages as special tree rewriting engines. |
basically, you have a tree, and you have a set of rules for rewriting; a rule is a pattern and a replacement for the matched node | |
Tree rewriting is a model of computation which is used in a variety of contexts within computer science, for example in semantic specification and compiler implementation | |
Maxim 28-Apr-2006 [435] | ok, so you pre-specify how path /aaa/bbb/ccc/ specifies data in another tree /xxx/yyy/zzz ? |
Gabriele 28-Apr-2006 [436x6] | no, you specify a pattern that can match a subtree, and replace that subtree with something else. |
xslt does something very similar; it matches a number of nodes (via xpath), then creates a new tree based on those nodes. rules are applied recursively so that you end up with a new tree starting from the initial tree. | |
there are only two votes so far, howeverr both voted for 3. maybe, we could introduce a new concept to CS, "dialect rewriting". :) it's the same as tree rewriting but without a tree. ;) | |
dialect rewriting is basically what my rewriting engine for rebcode does; it's rewriting where instead of using a regexp you use a parse rule; and instead of compiling a tree to another tree you compile a dialect to another dialect. | |
so it can be considered a superset of tree rewriting (since you can think of a dialect to represent trees) | |
i don't know if this concept can be generalized easily. but it would be interesting to figure out. | |
JaimeVargas 28-Apr-2006 [442] | But by avoiding the AST aren't you throwing the possibility for optimizations, a direct rewrite engine is more like a literal translator. The cool think of having an AST is all the tricks that you can play to produce more efficient code at the cost of pre-processing time. |
Anton 28-Apr-2006 [443] | Hmmm..... |
Pekr 28-Apr-2006 [444] | maybe noone votes for 3 because a) we have little understanding what xpath can do for us b) once we say "dialect" or rebol in general, we sometimess think it is cure for all proglems |
yeksoon 28-Apr-2006 [445] | the lack of vote for xpath and xslt.. maybe its because there is this thought of adding yet another layer just to manipulate the data etc (remember Carl's slide in DevCon 2004 ?... with REBOL on one side against a stack of others on the other side) |
Pekr 28-Apr-2006 [446] | maybe, but maybe not. We need to be able to interface XML (DOM) anyway .... (e.g. for plug-in ) |
JaimeVargas 28-Apr-2006 [447] | BTW, Gabriele you have my vote on tree rewriting. |
MichaelB 28-Apr-2006 [448] | Actually I don't care what directly is available (as a user), if just some things can be done: e.g. people need to process XML - thus people already knowing XSLT and XPATH would like to leverage their knowledge (I asume) - so if we get a dialect for this (2.) this is nice, but even nicer if there is some mechanism (a generalization) which allows to import an XSLT (ast?) or some XPATH query and return the (more rebolesque) according Rebol dialect 3. three has always this kind of attitude of being able to do everything better in Rebol itself - even if true (?), that's one of the problems with Rebol, that outsiders can't afford the time to do many things better (themself) or don't care, because they want use some standards nevertheless and Rebol drops out as an option so I vote for 2. with the ability for 1. maybe by the possibilities tree rewriting (or dialect rewriting) offers (I have not much glue about this - so some of the experts should know) |
Pekr 28-Apr-2006 [449] | I agree to MichaelB .... but maybe then I vote for 1, 2 and 3 as well, so that 3 can be translated to "standard" |
older newer | first last |