From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [9fans] OT: small xml parser found! From: Dave Lukes To: 9fans <9fans@cse.psu.edu> In-Reply-To: <4502bcb48e3442e77ed8235a3a57402f@juice.thebigchoice.com> References: <4502bcb48e3442e77ed8235a3a57402f@juice.thebigchoice.com> Content-Type: text/plain Message-Id: <1077194211.30893.200.camel@zevon> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Date: Thu, 19 Feb 2004 12:36:51 +0000 Topicbox-Message-UUID: ed70b288-eacc-11e9-9e20-41e7f4b1d025 > i had an xmlfs in my mind I like the idea, but I can't see how you would cleanly handle either the representation or the ordering. e.g. if you have something like:

Here follows some bold text and this is bold-italic and this isn't either.

How do you represent it as a set of files and directories? The only way I can see is to basically do what the XML parsers out there do and make it into a sort of tree of lists of trees ... Now you _can_ do it with directories etc., but ordering etc. becomes problematic: you'd need to provide your own sequence numbering in the filenames unless you want to hack rc ... > with anonymous node IDs What is an "anonymous node ID"? If you're relying on the majority of nodes having ID attributes you'll come unstuck on "real" XML, where IDs may be a special case but are deffo not mandatory. I was thinking of something similar, but naming the directories/files after the tag names somehow, so you could extract all the paragraphs (using du:-). > given invalid names such as id="#51" (so that they could have a directory in the tree using their ids) > so long as it could host xhtml Not sure what you mean by "host xhtml". Since xhtml is an xml application, if it can parse xml, then it can parse xhtml by definition. > and then one could implement the DOM using shell scripts One could also write an xslt-to-rc converter (in rc:-). Any more ideas on xmlfs, anyone? Cheers, Dave.