jle Posted February 28, 2008 Share Posted February 28, 2008 Hi All,I am a new baby to web development and I have a question related to the convert between HTML to XSL.I had a mock up from graphic designer in HTML and I want to convert this file HTML to XSL. Is there any tool to help this convertion or any hints that I need to following to convert from HTML to XSL.Thanks in advance,JP Link to comment Share on other sites More sharing options...
boen_robot Posted February 28, 2008 Share Posted February 28, 2008 Do you mean XSLT or XSL-FO?If XSLT, "Tidy" can help you convert your HTML to XHTML if that hasn't been done already. From then on, it's a matter of doing <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <xsl:template match="/"> <!-- XHTML code here --> </xsl:template></xsl:stylesheet> (adjust the DTD to Transitional one if needed)If you really want to get any benefits of XSLT, you'll need to do some more work though, namely, match data in an XML file against the XHTML template in the XSLT.If you mean XSL-FO, then after converting your HTML to XHTML, you can use XSLT to convert the XHTML to XSL-FO. I'm not aware of any tools that can do XHTML-to-FO convertion on the fly, but there are tools that can convert (X)HTML to PDF if that's the end result you're after. Link to comment Share on other sites More sharing options...
jle Posted February 28, 2008 Author Share Posted February 28, 2008 Do you mean XSLT or XSL-FO?If XSLT, "Tidy" can help you convert your HTML to XHTML if that hasn't been done already. From then on, it's a matter of doing<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <xsl:template match="/"> <!-- XHTML code here --> </xsl:template></xsl:stylesheet> (adjust the DTD to Transitional one if needed)If you really want to get any benefits of XSLT, you'll need to do some more work though, namely, match data in an XML file against the XHTML template in the XSLT.If you mean XSL-FO, then after converting your HTML to XHTML, you can use XSLT to convert the XHTML to XSL-FO. I'm not aware of any tools that can do XHTML-to-FO convertion on the fly, but there are tools that can convert (X)HTML to PDF if that's the end result you're after. Link to comment Share on other sites More sharing options...
jle Posted February 28, 2008 Author Share Posted February 28, 2008 Thanks for response!I have the mock up in HTML and want to convert it to XSL. Thanks,JP Link to comment Share on other sites More sharing options...
boen_robot Posted February 28, 2008 Share Posted February 28, 2008 Thanks for response!I have the mock up in HTML and want to convert it to XSL. Thanks,JPExcuse me, did you read what I said?There's no XSL. XSL is the early combination of XSLT and XSL-FO, which was divided into the two specification (XSLT and XSL-FO) before it became an official reccomendation.So which one of the two XSLs you want? XSLT or XSL-FO? Link to comment Share on other sites More sharing options...
jle Posted February 28, 2008 Author Share Posted February 28, 2008 Excuse me, did you read what I said?There's no XSL. XSL is the early combination of XSLT and XSL-FO, which was divided into the two specification (XSLT and XSL-FO) before it became an official reccomendation.So which one of the two XSLs you want? XSLT or XSL-FO?Hi,I am sorry!!! I meant XSLT .Thanks,JP Link to comment Share on other sites More sharing options...
boen_robot Posted February 28, 2008 Share Posted February 28, 2008 Hi,I am sorry!!! I meant XSLT .Thanks,JPOK, then again, read what I said:If XSLT, "Tidy" can help you convert your HTML to XHTML if that hasn't been done already. From then on, it's a matter of doing<?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <xsl:template match="/"> <!-- XHTML code here --> </xsl:template></xsl:stylesheet> (adjust the DTD to Transitional one if needed)If you really want to get any benefits of XSLT, you'll need to do some more work though, namely, match data in an XML file against the XHTML template in the XSLT. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.