Subject: RE: [xsl] XHTML [WAS: Grouping into a table (for vertical alignment)] From: "Daniel Joshua" <daniel.joshua@xxxxxxxxxxxx> Date: Thu, 27 May 2004 14:59:02 +0800 |
I am opening and XML with and XSL stylesheet. I made some changes to my XSL to make my output more XHTML compliant by adding output method="xml", the XHTML strict doctype and XHTML namespace into the <html> tag. Now MS Internet Explorer (6.0) is still able to display it as normal, but Mozilla (1.6) seems to look different (eg. of of my backgrounds and styles are not working). Has anyone experienced this before? XSL: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="page"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> <xsl:value-of select="title"/> </title> <link rel="stylesheet" type="text/css" href="stylesheets/default.css" media="screen"/> </head> OUTPUT: <?xml version="1.0" encoding="UTF-16"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test Login</title> <link rel="stylesheet" type="text/css" href="stylesheets/default.css" media="screen" /> </head> Regards, Daniel -----Original Message----- From: Daniel Joshua [mailto:daniel.joshua@xxxxxxxxxxxx] Sent: Wednesday, 26 May, 2004 5:54 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] XHTML [WAS: Grouping into a table (for vertical alignment)] With reference to http://www.w3.org/TR/xhtml1/#strict >3.1.1. Strictly Conforming Documents >A Strictly Conforming XHTML Document is an XML document that requires only the facilities described as mandatory in this specification. >Such a document must meet all of the following criteria: > >1. It must conform to the constraints expressed in one of the three DTDs found in DTDs and in Appendix B. > >2. The root element of the document must be html. > >3. The root element of the document must contain an xmlns declaration for the XHTML namespace [XMLNS]. >The namespace for XHTML is defined to be http://www.w3.org/1999/xhtml. An example root element might look like: > ><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > >4. There must be a DOCTYPE declaration in the document prior to the root element. >The public identifier included in the DOCTYPE declaration must reference one of the >three DTDs found in DTDs using the respective Formal Public Identifier. >The system identifier may be changed to reflect local system conventions. > >5. The DTD subset must not be used to override any parameter entities in the DTD. I believe you meant the above criteria. However, even if document does not strictly comply to the above, it should be still consider XHTML (just not strictly-conformant XHTML) as long as it is well-formed HTML. Well, I will the above changes to my stylesheet... Regards, Daniel -----Original Message----- From: Michael Kay [mailto:mhk@xxxxxxxxx] Sent: Wednesday, 26 May, 2004 4:03 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] XHTML [WAS: Grouping into a table (for vertical alignment)] > > As long as my HTML is well-formed, it is considered XHTML, right? > Wrong. Completely wrong. See the W3C XHTML spec. Michael Kay
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XHTML [WAS: Grouping into, Daniel Joshua | Thread | RE: [xsl] XHTML [WAS: Grouping into, Daniel Joshua |
RE: [xsl] Escape caracters, SMITH Neil | Date | RE: [xsl] XHTML [WAS: Grouping into, Daniel Joshua |
Month |