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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Semantics question?, Pawson, David | Thread | Processing a home-brewed FOT, Richard Light |
Re: Links between HTML documents pr, Brandon Ibach | Date | Re: Processing a home-brewed FOT, Toby Speight |
Month |