xsl-list
[Top] [All Lists]

RE: XHTML + XSL -> HTML problem

2004-05-24 06:10:05
As far as I know there shouldn't be a semi-colon as the penultimate characters in either the DOCTYPE declaration or the html opening tag.

Joe



From: Angeshwar Deepak <angeshwar(_at_)yahoo(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] XHTML + XSL -> HTML problem
Date: Mon, 24 May 2004 06:03:37 -0700 (PDT)


Hi,

I have a XHTML file as follows


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";;>
 <html xmlns="http://www.w3.org/1999/xhtml";;>
 <head>
 <title> XHTML sample </title>
 </head>

 <body>

 <p name="who">Anand</p>
 <p name="job">Web Developer</p>
 <p name="area">California</p>

 </body>
 </html>


My xsl file is as follows


<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";;
  xmlns:xhtml="http://www.w3.org/1999/xhtml";;>

    <xsl:output method="text"/>

   <xsl:template match="xhtml:title">

        <xsl:text>title: </xsl:text>
        <xsl:value-of select="."/>
        <xsl:text>
</xsl:text>
    </xsl:template>

    <xsl:template match="p">
        <xsl:text>paragraph "</xsl:text>
        <xsl:value-of select="@name"/>
        <xsl:text>": </xsl:text>
        <xsl:value-of select="."/>
        <xsl:text>
</xsl:text>
    </xsl:template
</xsl:stylesheet>


I want to parse it and get the result as
a HTML page.

I parse it via msxsl parser, but I get this error

D:\deepak\buildProcess_2\_tools>msxsl test.xhtml
test.xsl -o test.html

Error occurred while parsing document.

Code:   0xc00ce50a
URL:
file:///D:/deepak/buildProcess_2/_tools/test.xhtml
Line:   2
Column: 70
The character '>' was expected.


When I parse it thro Ant build, I get the error as

     [xslt] Processing
D:\deepak\buildProcess_2\_tools\test.xhtml to
D:\deepak\buildProcess_2\_tools\test.html
     [xslt] Loading stylesheet
D:\deepak\buildProcess_2\_tools\test.xsl
     [xslt] [Fatal Error] test.xsl:2:51: Element type
"xsl:stylesheet" must be followed by either attribute
specifications, ">" or "/>".
     [xslt] : Fatal Error!
org.xml.sax.SAXParseException: Element type
"xsl:stylesheet" must be followed by either attribute
specifications, ">" or "/>". C
ause: org.xml.sax.SAXParseException: Element type
"xsl:stylesheet" must be followed by either attribute
specifications, ">" or "/>".
     [xslt] Failed to transform using stylesheet
D:\deepak\buildProcess_2\_tools\test.xsl
     [xslt] Failed to process
D:\deepak\buildProcess_2\_tools\test.xhtml

BUILD FAILED
file:D:/deepak/buildProcess_2/_setup/docs.xml:198:
Fatal error during transformation

Can some one suggest some solution.

Also how and where should I include the statement
manually inside the
xhtml file to indicate to parse via the xsl file.

In xml files we include the statement
<?xml-stylesheet type="text/xsl" href="bcel-fb8.xsl"?>

Is parsing a XHTML via xsl a similar process?

bye,
with regards,
Deepak.





__________________________________
Do you Yahoo!?
Yahoo! Domains ? Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--





<Prev in Thread] Current Thread [Next in Thread>