Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: ANN: xml-object.r , and...a question about REBOL's built-inparse-xml

From: joel::neely::fedex::com at: 5-Oct-2001 15:28

Hi, Gavin, Thanks for the clarification! Gavin F. McKenzie wrote:
> What I was referring to is the following: > > <foo bar="something"> > <bar>something</bar> > </foo> > > In that example foo has both a child element named 'bar' and an > attribute named 'bar'. While it is perfectly legal to do this, > it is considered (by many) to be poor form because it makes the > representation of the XML in objects and exposure into scripting > engines (such as Active Scripting or some other script engine) > problematic. >
With my understanding fixed, I admit I disagree less ;-), but still don't this as much of an issue of concern. It seems to me that the concept of attributes is that of name/value pairs that are "parts of" an entity, whereas the concept of a child entity is a subordination issue -- a different relationship. Every time I've played with XML and XML parsing, those have been represented distinctly (e.g. in Perl, a hash for the name/value pairs in attributes and an array for contents; in REBOL a block of name/value pairs for attributes and a separate block of contents), so I wouldn't expect any real implementation issues. Just my $0.02... -jn- -- This sentence contradicts itself -- no actually it doesn't. -- Doug Hofstadter joel<dot>neely<at>fedex<dot>com