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 <date>899</date>).</para> To typeset each date on a separate line, but ignore the other content of paragraph, you could use something like the following: (element PARA (process-element-children)) (element DATE (make paragraph (process-children))) The result would be 1066 871 899 > 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 -- David Megginson david@xxxxxxxxxxxxx http://www.megginson.com/ DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Simple Recipe: process-element-chil, David Megginson | Thread | RE: Simple Recipe: process-element-, Pawson, David |
Simple Recipe: process-element-chil, David Megginson | Date | RE: Simple Recipe: process-element-, Pawson, David |
Month |