[REBOL] Re: Rebol & XML
From: bry:itnisk at: 6-Aug-2003 13:49
[
XML: {<?xml version="1.0"?>
<document>
<h>Heading</h>
<p class="Initial">Hi this is a <b>bold</b> paragraph.</p>
<p>this is a <span>stuff</span> paragraph</p>
</document>
}
'Load-XML produces:
[xml [#version "1.0"] document [h "Heading" p [#class "Initial" "Hi this
is
a" b "b
old" "paragraph."] p ["this is a" span "stuff" "paragraph"]]]
Which is OK for text processing, I feel.]
I guess so, shouldn't it give p["this is a" span ["stuff"] "paragraph"]
though.
> <?rebol-process call: "stringvalue" print call?>
>I haven't seen this before now. Is it something you've just thought of
(and
>so we can change it to better suit Rebol and users)? Or is this related
to
>some XML standard?
Processing Instructions aren't used that much, according to the xml
standard a PI is supposed to be passed to the processing application,
which can then do with it what it will, ignore it, parse it for other
stuff. An application which does make use of PIs is Apache Cocoon.
A common PI is the stylesheet PI, something like <?xml-stylesheet
href="some.xsl"?> (been a while since I used that, link here
http://www.w3.org/TR/xml-stylesheet/)
Some people don't like Processing Instructions and would like to get rid
of them in the next version of XML, but it doesn't look like they will
be gotten rid of.
So a PI can be used to pass evaluatable code if that's what one wants to
do with it.
A PI is anything with a structure <?....?> not at the top of the
document, that is to say the xml declaration <?xml version="1.0"?> is
not a PI despite the structural similarity.
>If it's something we can change, I think I'd like to see it as:
yeah it can be changed. As long as it has <? ?> structure it can contain
anything between the ? ?
>and discovered that 'Load-XML doesn't handle tags in a name-space. :(
yeah I thought there might be problems, another problem is in the rare
occurrence of namespace prefixed attributes.
In fact I think I've seen some Excel Workbooks with that.