You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Lee, Insoo" <In...@gs.com> on 2003/08/28 21:12:21 UTC

reading fo tags from database and using within xsl dynamically

  Hi,
  We need to read it a value dynamically from the database.
  and this value contains fop tags such as

  <fo:block>
	blah blah blah
  </fo:block>
  <fo:block>
	blah blah this is the second block
  </fo:block>


  Is there any way to display that within the xsl (this xsl contains other
fop tags too)?
  We tried following

 <xsl:template match="DISCLAIMER">
          <xsl:value-of select="."/>
 </xsl:template>



we also tried  and xsl:copy-of

  and disable-output-escaping="yes"... but 
  
  none of them works...

 Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: reading fo tags from database and using within xsl dynamically

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Lee, Insoo wrote:
>   We need to read it a value dynamically from the database.
>   and this value contains fop tags such as
> 
>   <fo:block>
> 	blah blah blah
>   </fo:block>
...
>   Is there any way to display that within the xsl (this xsl contains other
> fop tags too)?

Yes.

>   We tried following
> 
>  <xsl:template match="DISCLAIMER">
>           <xsl:value-of select="."/>
>  </xsl:template>
> 
> we also tried  and xsl:copy-of
> 
>   and disable-output-escaping="yes"... but 
>   
>   none of them works...

Well, "not working" could mean a lot of things. Could you be
a bit more specific?

I guess you got "<fo:block>" literally in your result, or
nothing at all and an error message in the logs (like "text
must not be child of fo:flow"). You probably constructed a DOM
or something like this and inserted the strings retrieved from
the DB as text nodes, then feed this to the transformation.
The stuff retrieved from the DB stayed just that: text. You'll
have to parse them as XML in order to have them the effect you
want to have. How to do this depends on how you assemble your
source data. A semi-simple way is to construct the whole XML
as a string and pass it as a StreamSource reading from a
StringReader to the transformer.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org