[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

HTML to XML

Subject: HTML to XML
From: "Knight, Michel" <michel.knight@xxxxxxxx>
Date: Wed, 27 May 2009 11:14:35 -0400
 HTML to XML
Hi,
USING:
XLST 2.0 with XPATH 2 from the command line for testing will implement
later on a VB solution.
OS: Windows XP
Saxon 9.1.0.6N from Saxonica
Trying to get the title node content from menu_test.htm using test.xsl:
As you can see I've tried a few combination with no success, could
anybody educate me on the proper approach.

Here my command line:
c:\mik\xslt2\NET\bin\transform menu_test.htm test.xsl
Here the files:
----------------------------------------------test.xsl
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/199/xhtml">
<xsl:template match="xhtml:html">
<html>
<head>
<title>Testing</title>
</head>
<body>
	<!--xsl:value-of select="xhtml//head//title"/-->
	<!--xsl:if test="not(xhtml:head/xhtml:title)">Attribute
missing</xsl:if-->
	<!--xsl:value-of select="xhtml:head/xhtml:title"/-->
	<!--xsl:value-of select="xhtml:test"/-->
	<!--xsl:value-of select="string(test)"/-->
<xsl:value-of select="xhtml//head//title"/>
<!--xsl:text> <xsl:value-of select="xhtml//head//test"/> </xsl:text-->
</body>
</html>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------Menu_test.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
<https://sera-mtl.cgi.com/exchweb/bin/,DanaInfo=.awfdpenrGm6msm0utPv5ATx
25.3H+redir.asp?URL=http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Corporate Services - Organizational Chart - What We Do -
Organization - Transport Canada</title>
<!-- METADATA BEGINS | DEBUT DES METADONNEES -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<meta name="dcterms.issued" scheme="W3CDTF" content="2002-08-21" />
<meta name="dcterms.modified" scheme="W3CDTF" content="2008-10-21" />
<meta name="dc.subject" scheme="gccore" content="Corporate Services" />
<meta name="dc.language" scheme="ISO639-2/T" content="eng" />
<!-- PROGRESSIVE ENHANCEMENT ENDS | FIN DE L'AMELIORATION PROGRESSIVE
-->
</head>
<body>
<div class="page">
Some content
</div>
</body>
</html>
------------------------------------------------------------------------
--------------------
What I'm I missing this is done for a migration project, your guidance
will be appreciated.
Michel

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.