Hi Suma, 

Yes. Just like you can store the complete element-tree as an xml, you can 
create an element-tree from an xml. Create the tree from your text xml and add 
it to item.

I'd advise you to use a distinct root node for your xml, so you have a distinct 
starting point for your transformation file. 

Example: <title><html>This Is an Example of</br>a Red Subject</html></title> 
<text><html>This Is an Example of</br>a Red Subject</html></text>

Here you know, you have to check for HTML-Tags only inside subnodes of the 
<html> node. Helpful for example, if you want to process complete html pages 
with included <title> tags.

Mit freundlichen Grüßen
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 
-----Ursprüngliche Nachricht-----
Von: sssr [mailto:s_sum...@yahoo.com] 
Gesendet: Donnerstag, 23. April 2009 03:53
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: interpret html stuff in xml aand pply the html formatting to 
pdf out


Thank you Georg

I will make sure that <br> will have closing tags. how I can pevent the 
encoding of the < and > to &lt; and &gt;.

I have a string with all html tags in it. and I am creating xml with this 
string from java using xerces dom. it is automatically encoding all of the html 
< and > to &lt; and &gt;

Below is the sample code snippet of what I am doing


String titleString = "This Is an Example of a Red Subject"

 Document doc = new DocumentImpl();
  Element root = doc.createElement("trivin-bulletin");
  Element item = doc.createElement("title");
  item.appendChild(doc.createTextNode(titleString));



Is there a way I can insert the html tags as it is instead of encoding the < 
and > to &lt; and &gt;

Thank you,
Suma



Georg Datterl wrote:
> 
> Hi Suma,
> 
> Seems like your xml file is not correct. The text is not correct XML 
> (<br> tag without closing br tag) and the < and > seem to be encoded 
> as &lt; and &gt;. Your transformation file does not find tags and 
> therefore can't apply templates.
> 
> Mit freundlichen Grüßen
>  
> Georg Datterl
>  
> ------ Kontakt ------
>  
> Georg Datterl
>  
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>  
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert
> 
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>  
> www.geneon.de
>  
> Weitere Mitglieder der Willmy MediaGroup:
>  
> IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
> Willmy PrintMedia GmbH:                            www.willmy.de
> Willmy Consult & Content GmbH:                 www.willmycc.de 
> -----Ursprüngliche Nachricht-----
> Von: sssr [mailto:s_sum...@yahoo.com]
> Gesendet: Mittwoch, 22. April 2009 16:09
> An: fop-users@xmlgraphics.apache.org
> Betreff: interpret html stuff in xml aand pply the html formatting to 
> pdf out
> 
> 
> I am using fop 0.95 to generate pdf from xml and xsl input.
> 
> I have an xml file with some html stuff in it(a string with html tags 
> like fonts , lists... . This string is put into xml file using java). 
> I put in the templates for these html tags in xsl file. But when the 
> pdf is generated it is dislpaying the html tags as it is instead of 
> doing the actual formatting. I am not sure what I missing. I have 
> attached the xml and xsl files and the pdf for review. Can you please 
> look into the xml and xsl and let me know if I am missing some thing 
> or if there is a better way to acheive this.I appreciate all your help
> 
> Thank you,
> Suma
> 
> http://www.nabble.com/file/p23175475/TrivinBulletinXML.xml
> TrivinBulletinXML.xml
> http://www.nabble.com/file/p23175475/TrivinBulletinXSL.xsl
> TrivinBulletinXSL.xsl
> http://www.nabble.com/file/p23175475/TrivinBulletinReport.pdf
> TrivinBulletinReport.pdf
> --
> View this message in context:
> http://www.nabble.com/interpret-html-stuff-in-xml-aand-pply-the-html-f
> ormatting-to-pdf-out-tp23175475p23175475.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 
> 
> 

--
View this message in context: 
http://www.nabble.com/interpret-html-stuff-in-xml-and-apply-the-html-formatting-to-pdf-out-tp23175475p23186137.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to