473,405 Members | 2,185 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,405 software developers and data experts.

XHTML - Doctype and output

What is the proper doctype syntax for XHTML transitional??? Strict? How
come XSLT doesn't preserve XHTML when it is compiled (Xalan)? Meaning, <br
/> tags become <br> <input /> tags become <input> etc. It seems I am dazed
and confused? Any hints or clear online resources appreciated.

John
Jul 20 '05 #1
3 1910
johkar wrote:
What is the proper doctype syntax for XHTML transitional??? Strict?
http://www.w3.org/QA/2002/04/valid-dtd-list.html
How come XSLT doesn't preserve XHTML when it is compiled (Xalan)?
Meaning, <br /> tags become <br> <input /> tags become <input> etc.


Maybe you have it set to generate HTML output.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2


johkar wrote:
What is the proper doctype syntax for XHTML transitional??? Strict? How
come XSLT doesn't preserve XHTML when it is compiled (Xalan)? Meaning, <br
/> tags become <br> <input /> tags become <input> etc. It seems I am dazed
and confused? Any hints or clear online resources appreciated.


Well the XSLT 1.0 output method html is supposed to output according to
HTML rules and not XHTML rules thus if you have
<xsl:output method="html" />
or you happen to have a root result element
<html>
then the XSLT processor uses the html output method and in HTML a br
element in the tree needs to be serialized as <br>, an input element in
the tree needs to be serialized as <input>. See
http://www.w3.org/TR/xslt#section-HTML-Output-Method

Thus if you want to have XHTML as the result of an XSLT 1.0
transformation you need to use
<xsl:output method="xml" />

Some processors (like Saxon for instance, I don't know about Xalan) also
know a special output method called xhtml that outputs XHTML according
to the HTML 4.01 backwards compatibility rules given in the XHTML 1.0
specification.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #3
Thank you both for the replies and good info.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #4

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

Similar topics

4
by: Peter C. Chapin | last post by:
I have a need to include Greek letters in some of my XML documents (the documents contain astronomical information and many stars are named using Greek letters). Following some earlier postings on...
5
by: Greg | last post by:
Hi everybody, so, I would like to use XML files for some parts of my website. I would like to respect W3C XHTML 1.1 recommendation. Then, I have these two docs : o My XML file: <?xml...
13
by: Tjerk Wolterink | last post by:
Hello i've an xsl stylesheet that must support xhtml entities, my solution: ---- <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE xsl:stylesheet > <xsl:stylesheet version="1.0"...
3
by: Grant Harmeyer | last post by:
I have an XSL file that is being applied to an RSS feed, and it works great except for 2 things: 1.) XSL doesn't close the <img> tag for xhtml even though I have it being closed in the XSL file...
10
by: Daniel R. Tobias | last post by:
I've happened to look at the source code to a number of Web sites lately, and have noticed a distressing tendency for them to include pseudo-XHTML syntax (e.g., tags ending with "/>") even when the...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
15
by: Zhang Weiwu | last post by:
http://www.w3.org/MarkUp/2004/xhtml-faq provided a trick to serve xhtml webpage to IE as application/xml I used that trick and now every one of my xhtml webpage have following first 4 starting...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
1
by: TamusJRoyce | last post by:
I have xsl code which I was hoping could be used to replace one specific tag from an xhtml document and output another xhtml document. xsl has phenomenal potential in data replacing, but coming...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.