Jump to content

Convert from html to xsl


jle
 Share

Recommended Posts

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

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

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

Thanks for response!I have the mock up in HTML and want to convert it to XSL. Thanks,JP
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?
Link to comment
Share on other sites

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

Hi,I am sorry!!! I meant XSLT .Thanks,JP
OK, 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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...