Re: A Newbie question (sorry)

Subject: Re: A Newbie question (sorry)
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Fri, 4 Dec 1998 17:03:52 -0600 (CST)
J-P Theberge said:
> 
> Hi,
> 
> I'm a newbie learning dsssl.
> I hope you will forgive me for my basic questions.
> (I will probably have a lot for the months to comes...)
> 
> When converting xml -> html with Jade, how can I convert
> 
> <tag>text</tag> 
> 
> to
> 
> &#160;<br><br>text
> 
   What you'll probably want here is either the "formatting-instruction"
flow object (nonstandard FO, part of James' SGML transformation
package) or a simple (literal) call.  The obnoxious part is getting
the &#160; to come out right.
   Keep in mind that the (make element ...) call returns a SOSOFO
(Specification Of a Sequence Of Flow Objects).  For simplicity's sake,
you can just think of it as returning a flow object.  The (literal) call
also returns a series of flow objects, one for each character in the
string which is passed to it.
   So, something like the following should do what you want.
      (element tag
        (sosofo-append
          (literal "&amp;#160;")
          (make empty-element gi: "br")
          (make empty-element gi: "br")
          (process-children)))
   You'll need to put an <!entity amp "&"> declaration up near the top
(right after the doctype declaration would work) of your stylesheet.
There may well be an easier (or more correct) way to do this, but I at
least know that this works.

-Brandon :)


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


Current Thread