[Home] [By Thread] [By Date] [Recent Entries]

  • From: Matt Sergeant <matt@s...>
  • To: Tim Bray <tbray@t...>
  • Date: Sat, 04 Nov 2000 20:12:46 +0000 (GMT)

On Sat, 4 Nov 2000, Tim Bray wrote:

> At 06:05 PM 04/11/00 +0000, Matt Sergeant wrote:
> > Basically, procedural
> >code is great for data oriented XML structures, but almost useless for XML
> >mixed content. For mixed content you really need declarative code. 
> 
> Wow; a neat bifurcation of the universe.  I wish life were that
> simple.  Suffice it to say that many will disagree with this
> particular pair of broad brush strokes. -Tim

Go on then, disagree :-)

I make careful note that a stream based parser that says:

  if (element == 'foo') {
    ...
  }
  elsif (element == 'bar') {
    ...
  }

is also declarative, as would be a DOM based parser that walks the DOM
tree with some sort of iterator doing something similar. By procedural I
mean something that says:

foreach foo element
	output "foo: "
	foreach bar element child of foo
		output " = "
		foreach text child of bar
			output the text

Mapping that model to mixed content is, umm, difficult, to say the least.

-- 
<Matt/>

    /||    ** Director and CTO **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site: http://sergeant.org/     **
     \\//
     //\\
    //  \\


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member