Re: Semantics question?

Subject: Re: Semantics question?
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Mon, 20 Jul 1998 09:11:55 -0500 (CDT)
Pawson, David said:
> 
> 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.
> 
   Another short answer... Given that the adsline1 element is
required, so you know there will always be something for that, why
don't you have the rule for adsline1 just do (process-children) to
output its contents, then have the rules for all the other elements do
a concatenation of a comma and the contents of the element.  In other
words, make each element responsible for separating itself from the
last one.  That way, the separator only gets generated as needed.
   Feel free to slap me if I'm missing something and oversimplifying
this (it's early :).

-Brandon :)


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


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