Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XHTML - Doctype and output

Reply
Thread Tools

XHTML - Doctype and output

 
 
johkar
Guest
Posts: n/a
 
      10-07-2004
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


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      10-08-2004
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      10-08-2004


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
<xslutput 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
<xslutput 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/
 
Reply With Quote
 
johkar N
Guest
Posts: n/a
 
      10-09-2004
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Struts and XHTML strict doctype John Java 1 01-13-2008 11:51 PM
Do I need <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ..... in asp.net 2.0 ? Rolf Welskes ASP .Net 6 08-24-2006 02:56 AM
Difference between DOCTYPE HTML 4.01 and XHTML 1.0 Tatyana ASP .Net 1 08-08-2006 10:48 PM
XSLT XHTML MIX DOCTYPE PROBLEM Tjerk Wolterink XML 13 02-14-2005 07:11 PM



Advertisments