Semantics question?

Subject: Semantics question?
From: "Pawson, David" <DPawson@xxxxxxxxxxx>
Date: Mon, 20 Jul 1998 13:00:36 +0100
Need: To output an address as a single paragraph, each element comma
        Address is made up of addressline1 to addressline 3 etc.
<!ELEMENT address - -
	post-code?) >
 Caveats. any part of the address may be empty
E.g. 38 Gleneagles,Edenfield,Lancashire, PE3 7EJ   is OK
so is the above with any single addressline missing.

In order to get the surrounding paragraph I am using
(element address
	(make paragraph
	use: para-style
	(make sequence
		(process-matching-children "adsline1")
		(process-matching-children "adsline2")
		(process-matching-children "adsline3")
		(process-matching-children "town")
		(process-matching-children "county")
		(process-matching-children "country")
		(process-matching-children "post-code")

Since all processing apart from the last is identical,
I started to write a function to take current-node as a parameter

(define (commasepls nd)
(make sequence
   (process-children) ???
   (if (not(string=? (data nd) ""))
     (literal ","))))

then for each comma seperated element -

 (element adsline1
   (commasepls (current-node)))

Except! I don't have any 'children' at the time
the function is called (I think).

when I tried to put in (process-node-list nd)
I started to get warnings from jade about loops

I understand that current-node is a singleton node list,
which can be processed, but the semantics of what I
am dealing with I find confusing.

Any help appreciated,
TIA, DaveP

timeo gaecos dona ferentes

 DSSSList info and archive:

Current Thread
  • Semantics question?
    • Pawson, David - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id IAA09793Mon, 20 Jul 1998 08:03:48 -0400 (EDT) <=
      • Brandon Ibach - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id KAA15342Mon, 20 Jul 1998 10:12:03 -0400 (EDT)