Re: [xsl] how to translate XML with XHTML-formatted element to FO

Subject: Re: [xsl] how to translate XML with XHTML-formatted element to FO
From: "Magic Finger" <magic.finger@xxxxxx>
Date: Wed, 13 Apr 2005 09:42:25 +0200
Hello Charles,

the required output should be something like the following, where the
escaped HTML-tags (like the one for bold (&lt;b&gt;) and italic (&lt;i&gt;)
formatting) inside the <TITLE> element of input file should be
interpreted/translated as desired.

----------
OUTPUT:
----------
--- books.fo --->
 ...
 <fo:flow flow-name="xsl-region-body">
  <fo:block>
   <fo:block space-before.optimum="1pt" space-after.optimum="2pt">
    <fo:block>Author: Walt Disney</fo:block>
    <fo:block>Price : US$ 19.90</fo:block>
    <fo:block>Title : <fo:inline font-weight="bold">Donald Duck -
</fo:inline><fo:inline font-style="italic">The True
Story</fo:inline></fo:block>
   </fo:block>
   <fo:block space-before.optimum="1pt" space-after.optimum="2pt">
    <fo:block>Author: Matt Groening</fo:block>
    <fo:block>Price : US$ 25.00</fo:block>
    <fo:block>Title : <fo:inline font-weight="bold">Homer Simpson For
President</fo:inline></fo:block>
   </fo:block>
  </fo:block>
 </fo:flow>
 ...
<--- books.fo ---

---------
INPUT:
---------
--- books.xml --->
<BOOK>
  <AUTHOR>Walt Disney</AUTHOR>
  <PRICE>19.90</PRICE>
  <TITLE>&lt;b&gt;Donald Duck - &lt;i&gt;The True
Story&lt;/i&gt;&lt;/b&gt;</TITLE>
</BOOK>

<BOOK>
  <AUTHOR>Matt Groening</AUTHOR>
  <PRICE>25.00</PRICE>
  <TITLE>&lt;b&gt;Homer Simpson For President&lt;/b&gt;</TITLE>
</BOOK>
  ...
<--- books.xml ---

Best regards,
Maik


You have shown us your input, now how about some idea of what the output should be. I have read your post several times and I can't understand what problem you are trying to solve.


It may be that you need to process the document in stages or you may need advice on constructing a template. I just can't understand what you need using the information you have given.
--
Charles Knell
cknell@xxxxxxxxxx - email

Current Thread