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 seperated. Address is made up of addressline1 to addressline 3 etc. <!ELEMENT address - - (adsline1, adsline2?, adsline3?, town, county?, country?, 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: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Links between HTML documents pr, Brandon Ibach | Thread | Re: Semantics question?, Brandon Ibach |
Links between HTML documents produc, pkjames | Date | Processing a home-brewed FOT, Richard Light |
Month |