Escape sequences and fop
Hi, I am seeing some strange behaviour with FOP in an embedded servlet environment and also within my (XML Spy) development environment. I have an XML file and and XSL file. I process the files producing an fo document which is rendered by FOP. There is one tag which needs embedded fo tags but only to be rendered fop and passed as is by the XSL transformation. Here's a snippit from my XML file: HTBodyText #60;fo:block#62;example text#60;/fo:block#62; Please read our lt;fo:basic-link external-destination=http://www.someplace.com/risk_warnings.htmlgt;Risks Warningslt;/fo:basic-linkgt; document /HTBodyText and the XSL file: fo:block text-align=left start-indent=5mm space-before=2mm font-size=12px color=#00 font-family=Arial, Helvetica, sans font-weight=normal xsl:value-of select=HTBodyText disable-output-escaping=yes/ /fo:block The embedded directives are only processed by FOP when I do this: 1. Run the xslt saving the output to a file 2. Pass the file to FOP for processing. However, if I do it all together, either by using XMLSpy or in my servlet, the output ALL comes out as text. Please help!!! Thanks Rakesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escape sequences and fop
Rakesh Patel wrote: HTBodyText #60;fo:block#62;example text#60;/fo:block#62; Please read our lt;fo:basic-link external-destination=http://www.someplace.com/risk_warnings.htmlgt;Risks Warningslt;/fo:basic-linkgt; document /HTBodyText and the XSL file: fo:block text-align=left start-indent=5mm space-before=2mm font-size=12px color=#00 font-family=Arial, Helvetica, sans font-weight=normal xsl:value-of select=HTBodyText disable-output-escaping=yes/ /fo:block The embedded directives are only processed by FOP when I do this: 1. Run the xslt saving the output to a file 2. Pass the file to FOP for processing. However, if I do it all together, either by using XMLSpy or in my servlet, the output ALL comes out as text. XML Spy process it exactly as you are saying - transform into a file and run FOP.bat on this file. By it's nature disable-output-escaping assumes that result of the transformation is serialized and reparsed again, that's why it doesn't work in FOP as in any SAX streaming environment. Remember gold rule of xslt - don't use d-o-e unless you are generating non-XML. Why do you need it? -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Escape sequences and fop
Hi Oleg, the reason I need to use disable-output-escaping is because at present the xml data (the HTBodyText tags) sometimes contains html tags. I need to replace these with their fo equivalents. If you know how else to do this, please let me know. I am going to go back to some previous code that generated an intermediate file and then pass that to fop. Cheers Rakesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escape sequences and fop
Rakesh Patel wrote: the reason I need to use disable-output-escaping is because at present the xml data (the HTBodyText tags) sometimes contains html tags. I need to replace these with their fo equivalents. If you know how else to do this, please let me know. I am going to go back to some previous code that generated an intermediate file and then pass that to fop. What do you mean by replace these with their fo equivalents? If html code is well-formed you can process it by xslt as usual, if not - how can you match it to replace, by string matching? -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]