9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dave Lukes <davel@anvil.com>
To: 9fans <9fans@cse.psu.edu>
Subject: Re: [9fans] OT: small xml parser found!
Date: Thu, 19 Feb 2004 12:36:51 +0000	[thread overview]
Message-ID: <1077194211.30893.200.camel@zevon> (raw)
In-Reply-To: <4502bcb48e3442e77ed8235a3a57402f@juice.thebigchoice.com>

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

	<p>Here follows <b>some bold text <i>and this is bold-italic</i></b> and this isn't either.</p>

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.




  reply	other threads:[~2004-02-19 12:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-19  9:59 plan9fans
2004-02-19 10:13 ` David Tolpin
2004-02-19 11:04 ` Dave Lukes
2004-02-19 11:41   ` matt
2004-02-19 12:36     ` Dave Lukes [this message]
2004-02-19 13:45       ` C H Forsyth
2004-02-20  8:22         ` Martin C.Atkins
  -- strict thread matches above, loose matches on Subject: below --
2004-02-19 10:31 plan9fans
2004-02-17 13:50 steve-simon
2004-02-18 18:17 ` Roger Flores
2004-02-18 20:43   ` rog
2004-02-18 20:42     ` David Tolpin
2004-02-19 15:29       ` rog
2004-02-19 15:27         ` Gorka Guardiola Múzquiz
2004-02-19 15:31           ` boyd, rounin
2004-02-19 16:14             ` Rob Pike
2004-02-19 16:16             ` Rob Pike
2004-02-19 16:18               ` David Tolpin
2004-02-19 16:20               ` boyd, rounin
2004-02-19 15:54           ` John Murdie
2004-02-19 16:14             ` C H Forsyth
2004-02-19 16:24               ` John Murdie
2004-02-19 16:17             ` David Tolpin
2004-02-20  2:36               ` boyd, rounin
2004-02-19 17:15             ` rog
2004-02-19 17:20               ` David Tolpin
2004-02-19 17:31                 ` rog
2004-02-19 17:30                   ` David Tolpin
2004-02-19 17:45                     ` rog
2004-02-19 17:39                   ` C H Forsyth
2004-02-19 15:27         ` David Tolpin
2004-02-19 10:28     ` Roger Flores

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1077194211.30893.200.camel@zevon \
    --to=davel@anvil.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).