Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2006, 07:17 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT of an HTML data

Hallo,

I have just received an HTML file and my duty is to transform it to another HTML format site via XSLT. So till now I have used the XSL structure for XML datas and I am now a bit confused. Could someone show me the way how should I begin to write this XSL structure for an HTML data?

Your attitude determines your altitude
__________________
Your attitude determines your altitude
 
Old July 5th, 2006, 07:30 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Convert the HTML to well-formed XML using the Tidy or JTidy utility (http://jtidy.sourceforge.net/), then proceed as for transforming XML.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old July 5th, 2006, 07:35 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Michael for that tip I have another question. This HTML file is gonna be updated in every hour. So would it still be feasible for me to use jtidy? I mean this HTML pager is going to be obtained from a commercial provider automatically.

Your attitude determines your altitude
 
Old July 5th, 2006, 08:28 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If you're going to do it that frequently then it probably makes sense to look at the process that creates/updates the HTML in the first place. Why not make it well-formed XHTML, then you can process it directly. Even better, make it XML tagged with logical markup rather than presentation markup.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
html to xml convertion using xslt moshaik BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 2 November 24th, 2008 10:33 AM
How can I take HTML content in XSLT? nadavvin XSLT 7 September 6th, 2006 09:18 AM
HTML for XSLT tarunm XSLT 1 November 14th, 2005 11:29 PM
constructing a HTML table from xml data using xslt rameshnarayan XSLT 0 September 19th, 2005 06:53 AM
dynamic XSLT from HTML variable rich0437 XSLT 0 May 19th, 2004 05:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.