This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: <BR> a problem for XALAN?


keshlam@us.ibm.com wrote:
> If you tell Xalan (or any other XSLT processor) that you want to output
> HTML rather than XML, the serializer _should_ recognize the br element  and
> output a version that will work with browsers -- most likely the <br />
> version.

No, if it is outputting HTML, then it should output the HTML empty element
<br>. No trailing slash.

If you tell it you want to output XHTML (and assuming it has an output
handler for this), then <br /> is appropriate for compatibility with
existing user agents.

> NOTE HOWEVER that XML is case-sensitive. I don't remember whether HTML is
> officially uppercase or lowercase

HTML 4.01 section 3.2.1 says "Element names are always case-insensitive."
Examples throughout the spec use uppercase. Ever since I read
http://www.w3.org/Protocols/HTTP/Performance/Compression/HTMLCanon.html
I decided that I liked lowercase best.

XHTML 1.0 section 4.2 mandates that XHTML element and attribute names must
be lowercase. To make it easy to migrate from HTML output to XHTML output
in the future, using lowercase across the board is advisable.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]