it's hard to find an exact title for my problem, but i'll try to describe what i need to do.
the basic process is creating xml-documents from measurements that i need to show to the users. for a fast view / preview i use html-output that will be shown in a browser. the complete document will be printed in pdf (user can choose pdf after preview). i'm using xsl-transformations to create html und xsl-fo output from xml data and then apache fop to create pdf output from xsl-fo output. this main process is working.
but now, i'm looking for a solution to handle 'formatted text' in xml. the xml includes some database fields, and here, it's not clear, which 'formatted text solution' i should use and how i could handle this in xsl to create htlm and pdf-output.
my first idea was using html, so i can put the html from database into a CDATA Element in XML. to use the output directly in html, i could use this line of code
<xsl:value-of select="formatted_text" disable-output-escaping="yes"/>
the question here: is it possible and how is it possible to transform the CDATA html to the xsl:fo syntax?
i also could use the opposite solution using xsl:fo tags in the database and CDATA Element and need to transform this to html tags.
but my supervisor now has the idea to use a markdown language to store formatted text in the database. as a result, the xml CDATA Element will contain markdown language and i need to transform this data using xsl-transformations into html and xsl-fo syntax. is this possible? if yes, i need a tip or a small example to get on the right way how to do this.
as a workaround, i think i can use c# to translate markdown language into html und xsl-fo output and put these output into my xml document, one tag with html data and a second tag with xsl-fo data. my supervisor is not happy with this idea, but at the moment, i have no better ideas.
do you have any tips or examples, how to transform CDATA element into html / xsl-fo?