AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 18 |
r3wp | 648 |
total: | 666 |
results window for this page: [start: 101 end: 200]
world-name: r3wp
Group: Core ... Discuss core issues [web-public] | ||
Geomol: 25-Jan-2005 | Yes, I'm aware of that REBOL trick. :-) It's because, what I'm parsing might be blocks within blocks in a recursive way. XML is an example of such a structure. If I see a start-tag, I insert the beginning of a block in my result, then parse further in the document finding content and other start-tags and so on. The best way is to produce the output in a seriel manner from beginning to end, like I parse the input. | |
Group: Make-doc ... moving forward [web-public] | ||
Pekr: 10-Jan-2005 | what about alread mentioned open office format? Well, I expect it being rather complicated XML, but who knows ... | |
Geomol: 10-Jan-2005 | One of the goals with the MakeDoc format is, that it's possible to easily read with a normal text window, and some people may want to edit it with a normal text editor and write the formatting chars themselves. XML is not suited for that. XML also has the same start- and end-tag problem (that I mentioned above) as HTML. | |
Group: XML ... xml related conversations [web-public] | ||
Geomol: 7-Nov-2005 | Carsten, you're right about the " and '. As I read the DTD (http://www.w3.org/TR/2004/REC-xml-20040204/), those can only be found in attribute values (see [10] AttValue), not in character data (see [14] CharData). Is that correct? | |
Pekr: 7-Nov-2005 | I liked the discussion Chris and Brian hold here week or so ago ... simply let's find a way of how to work with XML in rebol - once we know what do we want, we can start coding ... | |
MichaelB: 7-Nov-2005 | Would it make sense to have XML files be represented as a port like xml:// . This could make sense for DOM and for SAX. But please correct me if that's stupid. For SAX this would enable one to copy from the port and get events by copying, for some one could navigate with some dialect and position the cursor in the document. A copy would read the data at the current positon - but then a block or something which represents an element could be returned. But I guess that's not well thought out. :-) | |
Geomol: 7-Nov-2005 | Carsten, I've added suport for " and ' in xml2rebxml. I've also added preservation of comments, if xml2rebxml is called with /preserve refinement (just call it like: xml2rebxml/preserve <xml code>). I've uploaded the scripts to my page: http://home.tiscali.dk/john.niclasen/rebxml/ I think, they need some testing, before they go to the library at www.rebol.org. | |
CarstenK: 7-Nov-2005 | John, I've downloaded it from your website - thank you! One more question from an unexperienced REBOL-user: What is the most commen way to enhance a block I've got with xml2rebxml, source is <?xml version="1.0" encoding="iso-8859-1"?> <chapter id="ch_testxml" name="Test XML"> <title>A chapter with some xml tests</title> <sect1 id="sct_about" name="About my Tests"> <title>What kind of tests I will do</title> <body> <para>Some simple paragraph.</para> </body> </sect1> </chapter> After read in the file with my-doc: xml2rebxml read %test.xml I'd like to insert a second sect1-element in the block my-doc, whats the best way - just to avoid some stupid mistakes. | |
Pekr: 7-Nov-2005 | Thanks Carsten, that clarifies things clearly to me .... I like Sax aproach more too .... IIRC Gavain's stuff was Sax like too ... it just could not write back to XML ... | |
Christophe: 7-Nov-2005 | I was fighting today to find the best internal data format. Out of the tests seems object! the most performant when using nested data structure. hash! when not nested. but the problem with object! is that we cannot have a recurrent element in the structure, like: <aaa> <bbb>content</bbb> <bbb bbb_attrib="attrib1"></bbb> </aaa> because, of course, when evaluated the last definition of bbb overrides the others. So, we are trying to work with hash! We got a little diminution of the overhead comparing to XML, but the processing time compare to block! seems from 10 to 20% more. I need some more tests about data retrieving in the structure to find the right combination; Any suggestion is welcome ! | |
MichaelB: 7-Nov-2005 | carsten: I should have kept my mouth shut about XOM and asked you before :-) the port-idea was just that a thought - in any case if one wants to use a dialect there has to be an entity to interpret the dialect, whether that's an function or something else doesn't matter, but a port seams to be a common rebol entity to encapsulate things - that's why I thought it would maybe even make sense to use a port as abstraction .... opening a port to an xml file and the port will parse it in whatever way - by sending (inserting) a dialected block into the port the xml document could be worked on - at least from the users point of view one wouldn't have to handle the xml-code-block/rebol code block separetely - even though it might be nice to access it directly .... well maybe I have too little glue about ports so the idea might not make too much sense when I forgot about some important drawbacks and the like | |
CarstenK: 7-Nov-2005 | to michael: maybe you can show some rebol pseude code, how to read all chapters from a book.xml file, so we had some nice use case to think about | |
CarstenK: 7-Nov-2005 | ... using a XML port | |
CarstenK: 7-Nov-2005 | to John (or geomol), first I've got the following error: >> my-cdoc: xml2rebxml/preserve read %short.xml ** Syntax Error: Invalid word -- --> ** Near: (line 9) --> So I replaced insert tail output load join "<!--" data with insert tail output join "<!--" data and it works fine with my files! You were right, the replacements in text nodes are only & > <. In attributes we need to escape the other 2 entities as allready done by you. | |
MichaelB: 7-Nov-2005 | carsten: I have to think about it ... quite some time I even used a java xml library | |
CarstenK: 7-Nov-2005 | Some more ideas: I think the idea behind rebxml is great - build some common format representing xml in REBOL blocks. Some more ideas/wishes: - maybe rebxml could be changed to ignore ignorable whitespaces, thats all whitespace between elements like line feeds, indention (beside elements with xml:space="preserve"), the block would be much smaller, but so the rebxml2xml script requires maybe a refinement /prettyprint with automatic indention - I think rebxml is a great idea, but for easier parsing maybe some words would help that indicate the beginning of special nodes like [elem "chapter" attribs [name "value" id "0815"] [ elem "sect" attribs [ id "5x12"] [ ....]] does it make sense? | |
CarstenK: 7-Nov-2005 | Is there some test script in rebol like Junit for java, so we could assemble some automated tests with different xml files? | |
Geomol: 7-Nov-2005 | Carsten, I tried to handle comments internal in RebXML as the tag! datatype, but there seem to be a problem with tags containing newlines, other tags, etc. as a comment in XML can. So my solution doesn't work. Now I consider, if comments should be stored as strings in RebXML, but then there's the problem to distinguish them from data strings. | |
Christophe: 7-Nov-2005 | > Some more ideas: I think the idea behind rebxml is great - build some common format representing xml in REBOL blocks. Some more ideas/wishes: > nodes like [elem "chapter" attribs [name "value" id "0815"] [ elem "sect" attribs [ id "5x12"] [ ....]] Our first solution (actually the one we're now using in production) was similar to that. But it brings a lot of ovehead to the data and the data adressing is far to be intuitive : aaa/elem/bbb/elem/ccc/attribs/name instead of aaa/bbb/ccc/name for instance. Not the most suitable solution as we experimented. | |
Christophe: 7-Nov-2005 | Geomol: why do you need to handle comments ? Aren't they there to facilitate the _reading_ of the XML code ? You'd not need them if you want to manipulate the data, right? | |
Geomol: 7-Nov-2005 | Right, but Carsten asked for comments, so: output: rebxml2xml xml2rebxml <XML file> will make output the same as the original XML input. | |
CarstenK: 8-Nov-2005 | Christophe: Thanks for the rebol-unit link, how different is EasyXML from rebXML? Another question: how near to XML 1.0 should the REBOL implementation be? If yes, so the block format needs a document block with doctype information and children (elements, text, comments, processing instructions and attributes) and of course namespaces. How about DTD support and external entities like this: <?xml version="1.0"?> <!DOCTYPE root [ <!ENTITY test SYSTEM "external.xml"> ]> <root> &test; </root> They don't need to be preserved but should be resolved. Geomol: I fully agree with you, to have a small format, but I think it would be nice if it supports the basic XML nodes. These are only my wishes of course ..., maybe we don't need extra words for elems and attributes, only for comments or PIs as special types of element children? | |
Geomol: 8-Nov-2005 | Carsten, I've uploaded new versions of the RebXML scripts to: http://home.tiscali.dk/john.niclasen/rebxml/ Comments are now handled as strings, they are simple preserved without modifications, and in rebxml2xml I then check for "<!--" in the start of the string to distinguish them from other string data. Sending xml-data through first xml2rebxml and then rebxml2xml should only change white-space within tags. Try the new versions and let me know, if it works. | |
Christophe: 8-Nov-2005 | I thought SAx was about finding the most suitable data structure - not a tree representation, which is DOM. I don't know if the event handling part is mandatory (BTW, to whom ?). isn't all about accessing XML data the best way a PL can ? | |
BrianH: 8-Nov-2005 | If you say "I want to do a SAX-style XML parser", you mean event handling. Other data models have their own apis to copy, or don't so you have to come up with something new :) | |
BrianH: 8-Nov-2005 | The important thing is to make sure that the events or data structures are a good map of the semantic model of XML. They have standards abut that too. | |
Christophe: 8-Nov-2005 | Did you have a look at the source of 'parse-xml ? Is this what is meant to be event-driven ? | |
BrianH: 8-Nov-2005 | No, parse-xml generates a (broken, incomplete) DOM tree. Gavin McKenzie's xml-parse is more like a SAX parser. | |
CarstenK: 9-Nov-2005 | I've also had a look inside xml-parse, it seems to be really like SAX - ready to use. But nobody is maintaining it, I think. As far as I understand, somebody could create a Handler to get the desired block structure (for instance a Handler for RebXML or any other model). I have to learn about this in REBOL. A question: how can I measure memory for a block or an object tree in REBOL? | |
CarstenK: 9-Nov-2005 | RebXML: I did some testing with rebxml, the documents I used can be found here: http://www.simplix.de/rebol/resources/xml/xmltests.zip There is also a simple script that reads the XML docs in and writes them back. Some problems I found: - empty attributes, I have fixed this in the zip - entities in content: all should be escaped, because they can be found there, otherwise a " gets &quot; - comments after last element missed - comments before first element - missing line feed - missing PIs in output Another question: encoding - it seems that all output files will be written in iso-8859-1 ? | |
CarstenK: 9-Nov-2005 | I have no idea about comparision of XML documents (input and output of rebxml for instance ) to ensure correctness, but it seems to be difficult. | |
CarstenK: 9-Nov-2005 | John: Thank you, I'll play with it. I found this python tool - maybe some interessting ideas there: http://uche.ogbuji.net/uche.ogbuji.net/tech/4suite/amara/quickref He uses objects but I like the idea for accessing xml - replacing the dots with slashes it looks for me like REBOL: doc/a/nodeName doc/a/b/1 ... doc/xml | |
Chris: 10-Nov-2005 | Catching up a little. Be interesting to summarise this thread as there are many different ideas expressed. rebxml looks interesting for loading, saving and likely extracting xml, but still perhaps difficult to manipulate. | |
Chris: 10-Nov-2005 | I've also noticed a tendency to kick the DOM (no doubt for good reason) -- though worth noting that it is a complete api to xml and it is a standard api, I wouldn't underestimate the value of the latter, particularly when it comes to Rebol advocacy... | |
Geomol: 11-Nov-2005 | RebXML is meant for conversion to/from the RebXML format and other formats (incl. XML). I use the RebXML format with NicomDoc, which makes it a lot easier to handle document formats. Let's say, you've got an XML file, and want to convert it to a format easily read by some application, then you first use xml2rebxml to get the XML file to RebXML format. Then make a converter from RebXML to the final format by renaming the rebxml2xml script and change it to do the output, that is wanted. rebxml2xml holds the structure of the RebXML format, so it's easier to start with that script. Search for "output" in rebxml2xml. Maybe I should make a converter from RebXML to some format very easily manipulated directly within REBOL, like the python tool, Carsten found. | |
Chris: 11-Nov-2005 | But this is the issue here with Rebol and XML, there are solutions that suit one XML operation or another. Aiming for loosely implementing DOM gives us loading, extraction, modification, and saving without affecting the integrity of the data structure. Examples: changing the title of an HTML page, adding an entry to an RSS file, etc. | |
Pekr: 11-Nov-2005 | hmm, couldn't we just somehow mix the aproach, so to have some streamed dom? :-) I don't like the idea of having 10MB XML interchange file to load into memory .... | |
Volker: 11-Nov-2005 | xml is used to store word-files, rebol not? :) | |
CarstenK: 12-Nov-2005 | in the moment i play a little bit with xml-parse.r, it has a lot of things done, some are still open (like <!ENTITY ...> parsing) and it is like SAX - I try to implement some handlers to learn REBOL, but it's still in progess. A benefit of xml-parse is, that there would be only one parser and some kind of standard API and the handler could then generate rebxml or some other desired format | |
Volker: 12-Nov-2005 | I guess in rebol we have fewer problems than java, as rebol is dynamic and java has to emulate that? So it cant map its own classes because the format is not known at compile-time? While we can. And then xml in memory should be in the order of rebol-blocks? | |
Maxim: 13-Nov-2005 | out of the blue, can anyone point me to the (or one) official XML spec ? (if there are many, it should be the one most used on windows and in things like PHP) thanks! | |
Chris: 14-Nov-2005 | http://www.w3.org/TR/REC-xml/ | |
Maxim: 22-Mar-2006 | xml is such bloat.. I am parsing xml these days and for two characters of data, I often have a 100+ characters of nested stupidity. | |
Maxim: 22-Mar-2006 | an empiric test (subjective to the xml structure and tag names obviously, but this IS a real world xml file) | |
Maxim: 22-Mar-2006 | 693 kb in xml form ==> 90 kb in nested rebol blocks | |
[unknown: 9]: 23-Mar-2006 | Agreed. So, write a Rebol block ML that does everything as well as XML, and we will support it. | |
Maxim: 12-Apr-2006 | my god reading the w3c spec for XML is insane. | |
Maxim: 12-Apr-2006 | XML overcomplicates soooo many things. its like the standard, for people who can't make up their minds: You can do this, or that or this too, but only when this and that or this occur outside and inside that other thing. | |
Sunanda: 12-Apr-2006 | XML was intended to be a simplification of SGML. But they forgot to ask first "why is SGML apparently some complicated?" So they ended up adding back in most of the complications in an ad hoc way. | |
Allen: 12-Apr-2006 | XML was a simple 2 page spec originally. | |
Allen: 12-Apr-2006 | I think that might be why the microformats are taking off. They use XML in its simplest, intended form. | |
Graham: 12-Apr-2006 | I'm on a list discussing, inter alia, CCR .. which stands for continuity of care record. It's XML, and so guys are saying it's taken them 50,000 lines to write the parsing code etc. | |
Pekr: 12-Apr-2006 | I think not, Graham .... we have such a problem ... big corporation, we try to define xml formats. The trouble is, big products do wrap it for you, but what about smaller companies? | |
Pekr: 12-Apr-2006 | not to mention browser incompatibilities, because in the case of XML, browser is your "preview" interface ... | |
Geomol: 12-Apr-2006 | If you need a simple XML spec, don't forget my RebXML: http://home.tiscali.dk/john.niclasen/rebxml/ (Only a couple of pages.) It's an easy way to work with XML inside REBOL, and on the same page you'll find scripts for converting between XML and RebXML. | |
Pekr: 12-Apr-2006 | I think that current situation of XML world shows, that it is rather absurd situation .... the idea of automatic exchange of docs, their specs, without involvement of ppl, is naive .... | |
Geomol: 12-Apr-2006 | I remember talk a few years ago, that MS would make their .doc format XML based. And people thought, that would mean, it would become an 'open' format, which could now be read and written by any wordprocessor. If you have somehing like: #{78797A7138373837} in binary, and choose to make it into XML: <xyzq>8787</xyzq> does that make you know, what it mean? No, of course not. Some MS employee later told in an interview, that MS of course would guard their IP - 'intellectual property'. I don't know, where the story ended, and I don't care much, as I keep away from MS formats. | |
Geomol: 12-Apr-2006 | If you choose to have your doc formats in something like the XML-based OpenDocument, where every tag is explained in an open specification, then it can be used. (Only problem then is XML itself with it's problems.) | |
Maxim: 12-Apr-2006 | saved out a 15 cell spread sheet in microsoft xml yesterday... 58kb of data HAHAHHAHAHAHAHA | |
Maxim: 12-Apr-2006 | Geomol, just looked over rebxml... I've build a similar engine, even simpler actually. but it might become a little bit smarter in a few weeks... maybe supporting more of the XML 1.0 specs like &chars conversion and such. | |
Pekr: 12-Apr-2006 | maxim - have you used Gawain's xml parser, or is it your own one? | |
Maxim: 12-Apr-2006 | my tool currenctly loads 1MB of xml tags in under a second. its almost as fast as load/markup. | |
Pekr: 12-Apr-2006 | hmm, I think that our problem is not lack of speed, but lack of fully compliant xml parser at first.... | |
Maxim: 12-Apr-2006 | reading the xml spec... its no wonder. | |
Rebolek: 12-Apr-2006 | pekr: no wonder there's still no fully compliant xml parser | |
[unknown: 9]: 12-Apr-2006 | my god reading the w3c spec for XML is insane. LOL | |
Maxim: 20-Apr-2006 | anyone know if any XML Schema integration has been done in REBOL? | |
[unknown: 9]: 21-Apr-2006 | 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 | ( 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 | 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. | |
Joe: 26-Apr-2006 | How does rebxml compare to gavin withead xml-parser.r ? | |
Joe: 26-Apr-2006 | I used Gavin's code in the past and found very complete and useful, specially when using xml-object.r | |
Gabriele: 27-Apr-2006 | 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 | |
Sunanda: 27-Apr-2006 | 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 | 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 ;-) | |
Pekr: 28-Apr-2006 | maybe, but maybe not. We need to be able to interface XML (DOM) anyway .... (e.g. for plug-in ) | |
MichaelB: 28-Apr-2006 | 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) | |
JaimeVargas: 28-Apr-2006 | I think Gabriel proposal is to rewrite the XML into an RXML "A easy to manipulate representation of XML in rebol". Then you rewrite back to XML if you need to. | |
Pekr: 28-Apr-2006 | that sounds good ... so far my only experience with XML in rebol is Gawain's work - better than nothing .... but what exactly do you mean by XML here? | |
Pekr: 28-Apr-2006 | this group exists for a long time, and IIRC initially we were more or less discussing rebol - XML interoperability - SAX or DOM parser in rebol .... while from what is being discussed now, sounds like slightly bit different topic? | |
Ingo: 28-Apr-2006 | I guess people have _very_ differing needs in this. Some _really_ need to handle XML with all strings attached to it, and others just want to interface to existing technoglogies and read / write xml. I'd put myself in the second category, if ever I have to work with XML again, that is. And I surely hope this won't happen ;-) | |
Ingo: 28-Apr-2006 | I once used XML as a file format, just to play around with it. And later I found out, that I'd broken so many rules, that no other gram was able to read it anyways. ;-) | |
Gabriele: 28-Apr-2006 | on top of this, one could probably implement something similar to xslt, to translate a tree (parsed from xml) to another tree (maybe xhtml or another xml doc) | |
Gabriele: 28-Apr-2006 | basically, what sql's select is for relational data, xpath is for xml data. | |
BrianH: 28-Apr-2006 | I have often missed structural pattern matching in REBOL, something like the match statement in Nemerle (I'm sure it's in other functional languages but that's the first that came to mind). You could combine a structural pattern specification dialect (like XPath) with a structure building dialect (like XSLT), and then make the dialect compilable to REBOL code that can be used over and over again. It would be like a regex compiler for structures - I would use this every day. All you would have to do to implement actual XPath syntax would be to specify a standard mapping of XML semantics in REBOL data structures (see my block model in this group from last October) and then have compile the XPath syntax (in a string) to the structure matching dialect. Then you could work from there. (Gabriele, sorry if this seems redundant - I'm trying to explain tree rewriting in more REBOL-like terms). | |
Christophe: 2-Jun-2006 | We'll use it in production very soon. I took a SAX approach because we've to manipulate big XML files, and it was a mean to boost performences. | |
Pekr: 8-Jun-2006 | I wonder if REBOL can get standards fully compliant XML parser/emitter .... | |
Anton: 18-Jun-2006 | I do not know much about the greater issues of XML, however. | |
Maarten: 3-Jun-2007 | Has anybody done work on translating XML schemas (perhaps automagically) to REBOL parse rules that can work on REbelXML/RebXML like native syntax? | |
Maxim: 5-Jun-2007 | the change in RebXML was to forego of a few limitiations and to allow direct xpath like useage of the loaded xml... which can't be done with RebXML out of the box. | |
Graham: 22-Oct-2008 | What are people using to create XML ? | |
Henrik: 22-Oct-2008 | The HTML Dialect can do a bit of XML | |
Graham: 25-Oct-2008 | Just playing with rebelxml >> set-xml-data/content 'header/to "[carl-:-rebol-:-com]" == "<header><to>[carl-:-rebol-:-com]</to></header>" Now if I start with "header" and "to", how would I get the same result? | |
Graham: 26-Oct-2008 | How are people creating large xml documents where there are large numbers of elements and where the data is being drawn from a database. Model the document first as a Rebol object!, and then generate the xml from the object? | |
BrianH: 27-Oct-2008 | Some databases have the ability to generate XML directly. That approach can be faster, depending on how much data the database has to process. It all depends on what database you are using though. | |
Graham: 4-Nov-2008 | Pekr thinks there is a tool that converts xml to a rebol object ... anyone know what it is? | |
Group: Rebol School ... Rebol School [web-public] | ||
Pekr: 4-Apr-2006 | part of my jog nowadays is get into XML, XSLT and that stuff ... we just upgraded SAP, and it generates some docs for us, which are ok in IE, not in FF (totally screwed) and on friday I visit IBM to see XForms and I will ask those guys, if it makes sense to go that route ... it seems like going to hell ... :-) | |
[unknown: 9]: 4-Apr-2006 | Pekr, given your level, what is there to learn in XML. "you" site down for 1 hour, read about, furrow your eyebrow, and your done. | |
Pekr: 4-Apr-2006 | Reichart - have you ever looked into stuff like transformations? If XML was all that easy as you suggest, how is that we don't have proper SAX or DOM parser in rebol - those supporting libs are sometimes larger than Core itself - I wonder, if it was intention of its creators ...... | |
[unknown: 9]: 4-Apr-2006 | It also renders JavaScript, and XML, and CSV, and SMS, and Email, etc. |
101 / 666 | 1 | [2] | 3 | 4 | 5 | 6 | 7 |