473,406 Members | 2,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

javascript with xsl

Hi,
I post here because, i think that my problem can happen to a lot of
people using javascript with xml and xsl and the future feedback can be
useful to all of us.

I hava an xml file with a tree structure and a xsl file to transform it
into xhtml strict. In my file xsl i have:
<head>
<title>Generic XHTML Treeview</title>
<meta http-equiv="Content-type" content="text/html;
charset=iso-8859-1"/>
<link rel="stylesheet" type="text/css" href="format.css"/>
<script src="functions.js" type="text/javascript"></script>
</head>
but when i transformate my xml code using xslt into xhtml. My xhtml code
has:
<head>
<title>Generic XHTML Treeview</title>
<meta http-equiv="Content-type" content="text/html;
charset=iso-8859-1"/>
<link rel="stylesheet" type="text/css" href="format.css"/>
<script src="functions.js" type="text/javascript"/>
</head>
und does not work correctly because of the unsatisfactory trasformation
of the line about javascript. Does anyone know how con i make to obtain
exactly the above line(exactly the same like in the xsl file).
Thanks for the future feedback.

--
Sergio del Amo

Jul 20 '05 #1
1 4437


Sergio del Amo wrote:
I post here because, i think that my problem can happen to a lot of
people using javascript with xml and xsl and the future feedback can be
useful to all of us.

I hava an xml file with a tree structure and a xsl file to transform it
into xhtml strict. In my file xsl i have:
<head>
<title>Generic XHTML Treeview</title>
<meta http-equiv="Content-type" content="text/html;
charset=iso-8859-1"/>
Content-Type text/html belongs to HTML and only to XHTML 1.0 when coded
according to the compatibility guidelines in the Appendix of the XHTML
1.0 specification. <link rel="stylesheet" type="text/css" href="format.css"/>
<script src="functions.js" type="text/javascript"></script>
</head>
but when i transformate my xml code using xslt into xhtml. My xhtml code
has:
<head>
<title>Generic XHTML Treeview</title>
<meta http-equiv="Content-type" content="text/html;
charset=iso-8859-1"/>
<link rel="stylesheet" type="text/css" href="format.css"/>
<script src="functions.js" type="text/javascript"/>
</head>
und does not work correctly because of the unsatisfactory trasformation
of the line about javascript. Does anyone know how con i make to obtain
exactly the above line(exactly the same like in the xsl file).


The problem is that you want to author XHTML but send it to the browser
as text/html. The best solution is to author HTML 4 instead, then simply use
<xsl:output method="html"
in your XSLT stylesheet. That should be supported by any XSLT 1.0
compliant XSLT processor.

If you want to stick with XHTML then you need to find an XSLT processor
which supports
<xsl:output method="xhtml"
and then outputs XHTML compliant with the compatibility guidelines.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.