XHTML Style Sheet Questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

XHTML Style Sheet Questions

Kennedy, Richard T

[1] The XHTML Style sheet generates the following html tag:
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
   The HTML Compatibility Guideline C.7 states:
        "Use both the lang and xml:lang attributes when specifying the
language of an element."
   Should the XHTML Style sheet be modified to add the xml:lang
attribute?

[2] The XHTML Style sheet generates empty elements without a space
before the trailing / and >,
    e.g., <link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"/>,
          <hr/>, <br/>
   The HTML Compatibility Guideline C.2 states:
       "Empty Elements Include a space before the trailing / and > of
empty elements, e.g. <br />, <hr /> and
       <img src="karen.jpg" alt="Karen" />. Also, use the minimized tag
syntax for empty elements, e.g. <br />,
       as the alternative syntax <br></br> allowed by XML gives
uncertain results in many existing user agents."
   Should the XHTML Style sheet be modified to add a space before the
trailing / and > in empty elements?

[3] The XHTML Style sheet generates anchor tags that contain the shape
attribute without the coords attribute.
    e.g., <a rel="disclosure"
href="http://www.w3.org/2004/01/pp-impl/37584/status" shape="rect"> ....
</a>
          <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosur
e" shape="rect"> ... </a>
    Based on my understanding of the XHTML Client-Side Image Map Module
 
<http://www.w3.org/TR/2002/WD-xhtml2-20021211/mod-csImgMap.html>, having
a shape attribute without the
         coords attribute is meaningless.
   Should the XHTML Style sheet be modified to not insert a shape
attribute without the corresponding coords
        attribute?


Richard T. Kennedy
The Boeing Company
W3C QAWG
W3C MWI BPWG



Reply | Threaded
Open this post in threaded view
|

Re: XHTML Style Sheet Questions

Bjoern Hoehrmann

* Kennedy, Richard T wrote:
>[1] The XHTML Style sheet generates the following html tag:
>    <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
>   The HTML Compatibility Guideline C.7 states:
>        "Use both the lang and xml:lang attributes when specifying the
>language of an element."
>   Should the XHTML Style sheet be modified to add the xml:lang
>attribute?

This is probably an error (Tidy would fix it, see below).

>[2] The XHTML Style sheet generates empty elements without a space
>before the trailing / and >,
>    e.g., <link rel="stylesheet" type="text/css"
>href="http://www.w3.org/StyleSheets/TR/W3C-WD.css"/>,
>          <hr/>, <br/>
>   The HTML Compatibility Guideline C.2 states:
>       "Empty Elements Include a space before the trailing / and > of
>empty elements, e.g. <br />, <hr /> and
>       <img src="karen.jpg" alt="Karen" />. Also, use the minimized tag
>syntax for empty elements, e.g. <br />,
>       as the alternative syntax <br></br> allowed by XML gives
>uncertain results in many existing user agents."
>   Should the XHTML Style sheet be modified to add a space before the
>trailing / and > in empty elements?

The result of the XHTML transformations should not be used with legacy
user agents; if these compatibility guidelines are a concern, use the
HTML transformations or post-process the result with e.g. HTML Tidy,
http://www.w3.org/mid/41ba13bd.259284953@... has
some details.

>[3] The XHTML Style sheet generates anchor tags that contain the shape
>attribute without the coords attribute.
>    e.g., <a rel="disclosure"
>href="http://www.w3.org/2004/01/pp-impl/37584/status" shape="rect"> ....
></a>
>          <a
>href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosur
>e" shape="rect"> ... </a>
>    Based on my understanding of the XHTML Client-Side Image Map Module
>
><http://www.w3.org/TR/2002/WD-xhtml2-20021211/mod-csImgMap.html>, having
>a shape attribute without the
>         coords attribute is meaningless.
>   Should the XHTML Style sheet be modified to not insert a shape
>attribute without the corresponding coords
>        attribute?

The shape attribute is defaulted in the XHTML DTDs to "rect", I guess
the insertion of such an attribute is a side-effect of DTD processing;
it doesn't really matter whether it's there or not.
--
Björn Höhrmann · mailto:[hidden email] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Reply | Threaded
Open this post in threaded view
|

Re: XHTML Style Sheet Questions

Henry S. Thompson
In reply to this post by Kennedy, Richard T

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kennedy, Richard T writes:

> [2] The XHTML Style sheet generates empty elements without a space
> before the trailing / and >,

The stylesheet doesn't generate serialisations at all, your XSLT
implementation does.  There are no mechanisms in XSLT itself to
control the serialisation of empty tags in XML mode.

I don't know if any XSLT implementations out there can be configured
to do something special with XHTML. . .

ht
- --
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: [hidden email]
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFD0MHgkjnJixAXWBoRAiDrAJ9H+CxofIPu4PWCt4dyqQEZqklEEACeKO+a
ORiaEbTqtDBUejbXJbbKIak=
=qmgC
-----END PGP SIGNATURE-----

Reply | Threaded
Open this post in threaded view
|

Re: XHTML Style Sheet Questions

Bjoern Hoehrmann

* Henry S. Thompson wrote:
>> [2] The XHTML Style sheet generates empty elements without a space
>> before the trailing / and >,
>
>The stylesheet doesn't generate serialisations at all, your XSLT
>implementation does.  There are no mechanisms in XSLT itself to
>control the serialisation of empty tags in XML mode.
>
>I don't know if any XSLT implementations out there can be configured
>to do something special with XHTML. . .

There are various that implement a special XHTML output method; XSLT 2.0
defines such a output method aswell, so any with XSLT 2.0 support should
have that.
--
Björn Höhrmann · mailto:[hidden email] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Reply | Threaded
Open this post in threaded view
|

Re: XHTML Style Sheet Questions

David Carlisle
In reply to this post by Henry S. Thompson


> I don't know if any XSLT implementations out there can be configured
> to do something special with XHTML. . .

You could use an xslt2 implementation, xslt2 has an xhtml output method
that does these "compatibility" hacks. Probably the stylesheet would
need a bit of customisation so that the templates using xslt1 extensions
for such things as multiple file output had options for using the xslt2
equivalents, but I wouldn't expect that many changes were needed.

But I agree with what others have said, if you are sending the files to
a legacy html browser, just using the html output method is the safest
course of action.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Reply | Threaded
Open this post in threaded view
|

Re: XHTML Style Sheet Questions

Norman Walsh-3
/ David Carlisle <[hidden email]> was heard to say:
| But I agree with what others have said, if you are sending the files to
| a legacy html browser, just using the html output method is the safest
| course of action.

My standard procedure is to run the results through tidy ("-q -utf8
-mn -asxml" if anyone is interested) before actually putting them on
the web. I think the XHTML stylesheets for XML Spec (which are, in
fact, generated entirely mechanically from the HTML ones) were a bad
idea. But several folks explicitly asked for them so I provided them.

                                        Be seeing you,
                                          norm

--
[hidden email] / XML Standards Architect / Sun Microsystems, Inc.
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.

attachment0 (196 bytes) Download Attachment