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 Reza Ghaffaripour <re...@gmail.com> on 2006/01/23 16:36:00 UTC
xml to html
hi list,
I started xsl a couple of hours ago on a new project and my question may
seem stupid.
in java, can we convert xml to html using xslt and give it some format, such
as making some parts bold ?
--
Reza Ghaffaripour
www.rezaghp.com
Re: xml to html
Posted by Jay Bryant <ja...@bryantcs.com>.
Hi, Reza,
Your question is off-topic for this list, but yes, you can.
For answers to questions involving how to do it, you should subscribe to the Mulberry XSLT list.
You'll need to use a Java-based XSLT processor that exposes an API that you can call from a Java application (or servlet or whatever). Saxon and Xalan-J are both possibilities.
Jay Bryant
Bryant Communication Services
----- Original Message -----
From: Reza Ghaffaripour
To: fop-users@xmlgraphics.apache.org
Sent: Monday, January 23, 2006 9:36 AM
Subject: xml to html
hi list,
I started xsl a couple of hours ago on a new project and my question may seem stupid.
in java, can we convert xml to html using xslt and give it some format, such as making some parts bold ?
--
Reza Ghaffaripour
www.rezaghp.com
Re: xml to html
Posted by Glen Mazza <gm...@apache.org>.
Reza Ghaffaripour wrote:
> hi list,
> I started xsl a couple of hours ago on a new project and my question may
> seem stupid.
> in java, can we convert xml to html using xslt and give it some format,
> such as making some parts bold ?
>
But of course. It's called XSLT and you don't need FOP for it. The
Apache Xalan project provides the XSLT processor for you, and you may
ask XSLT questions on the Mulberry XSLT list (Google). (This list is
for XSL formatting objects-related questions, which you won't be using
if your output is HTML.)
Very generally speaking, FOP is for PDF and Xalan is for HTML.
Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: xml to html
Posted by Clay Leeds <we...@mac.com>.
On Jan 23, 2006, at 7:36 AM, Reza Ghaffaripour wrote:
> hi list,
> I started xsl a couple of hours ago on a new project and my
> question may seem stupid.
> in java, can we convert xml to html using xslt and give it some
> format, such as making some parts bold ?
This is more of an XSL than an FOP-related question, but thie XML to
HTML article is a good spot to start[1].
They have an example where this article/title element:
<article fname="19990101_xsl">
<title>XML Style Sheets</title>
...
</article>
is converted w a <p><b>... using:
<xsl:template match="article/title">
<P><B><xsl:apply-templates/></B></P>
</xsl:template>
I hope this helps!
Web Maestro Clay
p.s.
[1] XML to HTML article
http://www.webdevelopersjournal.com/articles/xml_to_html.htm
[2] XSL FAQ
http://www.dpawson.co.uk/xsl/sect2/sect21.html
[3] XSL FAQ - HTML
http://www.dpawson.co.uk/xsl/sect2/N4554.html
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org