RE: Simple Recipe: process-element-children

Subject: RE: Simple Recipe: process-element-children
From: David Megginson <ak117@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 May 1998 08:37:01 -0400
[This message to which I'm replying came privately, but it looks like
it was intended for the group.]

Pawson, David writes:

 > Speaking for the less learned amongst the group David,
 > Could you add the plain English version of what is 
 > happening?

The `process-children' function processes all of an element's children
(elements, character data, etc.).  My `process-element-children'
function processes only the children that are elements, and skips
character data.

For example, imagine if you were interested only in dates and you had
an XML document containing the following:

  <para>In <date>1066</date> William the Bastard, Duke of Normandy,
  crossed the English Channel and fought with Harold Godwinson north
  of Hastings.  This was the last major foreign invasion of England,
  but many had preceded it, including those of the large Scandinavian
  armies fought off by AElfred of Wessex (ruled <date>871</date> to

To typeset each date on a separate line, but ignore the other content
of paragraph, you could use something like the following:

(element PARA

(element DATE
  (make paragraph

The result would be


 > What's a 'general validation script'?

That could be a DSSSL script that checks non-SGML/XML constraints, and
reports errors when they are violated.  For example, you could check
that all "n" attributes contain a value between 1 and 10.

All the best,


David Megginson                 david@xxxxxxxxxxxxx

 DSSSList info and archive:

Current Thread
  • Simple Recipe: process-element-children
    • David Megginson - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id HAA23544Wed, 20 May 1998 07:07:09 -0400 (EDT)
      • <Possible follow-ups>
      • David Megginson - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id IAA24700Wed, 20 May 1998 08:44:23 -0400 (EDT) <=
      • Pawson, David - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id JAA25321Wed, 20 May 1998 09:09:27 -0400 (EDT)