[REBOL] Re: Rebol & XML
From: bry:itnisk at: 5-Aug-2003 22:25
a propos the subject, realized after posting
earlier today that there was of course the
same problem with elements that I saw with
textnodes, i.e multiple elements as children
of a node, this will still be a problem
though, it seems to me if you just used
element names, as in
body: make object! [
hi I'm some text that's a child of the body
node
p: "hi this is a paragraph"
p: "this is another paragraph"
]
obvious problem(s) there.
what I was doing before for textnodes was
suggesting that there be a naming standard
of t{number}
so t1: "text"
t2: "more text"
then whenever one navigated to spot a path,
from there one could find out how many
textnodes there were, the same solution
could be done for elements.
also as I indicated before there is the
possibility of attributes having namespace
prefixes, so on second thought the
attributes syntax could be changed to the
following:
attributes:[
att1:[name: "m:att" value: "here is some
text" namespace: "http://www.someuri.com/m"]
]
other probs not touched on yet, processing
instructions and comments.
the question is really if one is wanting to
build something good that handles ones own
problems, or if one is wanting to build
something that can be built on top of later
to handle other problems, I don't think it
would be too much of a problem to build an
xml-to-object that just got the names of
elements and attributes and stuff and such
and worked in most cases, I don't think
however that such a tool would cover all
cases (maybe wrong about that, I'm not good
enough in Rebol to judge my judgements about
anything there, but I am tolerably well
informed about xml issues), I think a
totally generic tool will not allow a
straight rebolpath of
xml/workbook/documentProperties there'll
have to be a translation step.