<br/> and xslt

L

loveNUNO

I'am using xt to convert my xml with an xsl to html.
When i use <br /> in my xsl document in turns into <br> in the html.
So, How am I get <br/> TAG in output(html) like xhtml?
 
N

Nick Kew

one of infinite monkeys said:
Correct me if I'm wrong,

Consider yourself corrected.
but HTML 4.01 has a SHORTTAG YES clause in its
SGML Declaration.

Yes. That's a bug in the spec (if we accept the premise that the spec
relates to the Real World).
Doesn't that mean that constructs like <br/> _are_
allowed,
Sometimes.

and that a browser that doesn't read them just isn't fully
conformant?

A browser that fails to display a ">" after the <br> is not fully conformant.
At least in those places where it's technically legal.
 
P

Patrick TJ McPhee

% > Except that <br> is valid in HTML, while <br/> is not.
%
% Correct me if I'm wrong, but HTML 4.01 has a SHORTTAG YES clause in its
% SGML Declaration. Doesn't that mean that constructs like <br/> _are_
% allowed, and that a browser that doesn't read them just isn't fully
% conformant?

Let me reword my previous statement. <br> does not mean the same thing
as <br/> in HTML. <br/> does not mean the same thing in xHTML as it
does in HTML.
 
P

Patrick TJ McPhee

% % > In article <[email protected]>,
% > % On Mon, 10 Nov 2003 19:08:45 +0100, Patrick TJ McPhee wrote:
% > % > Except that <br> is valid in HTML, while <br/> is not.
% > %
% > % Correct me if I'm wrong, but HTML 4.01 has a SHORTTAG YES clause in its
% > % SGML Declaration. Doesn't that mean that constructs like <br/> _are_
% > % allowed, and that a browser that doesn't read them just isn't fully
% > % conformant?
% >
% > Let me reword my previous statement. <br> does not mean the same thing
% > as <br/> in HTML. <br/> does not mean the same thing in xHTML as it
% > does in HTML.
%
% Don't just leave us hanging. What's the diff?
%
% I don't know of any modern browser that a) doesn't accept <br/> or b)
% appears to treat it different than <br>, but maybe there's some subtlety I'm
% missing wrt b.

There's no subtlety here. As has been pointed out, <br/> in HTML is the
same as <br>>. It may be that there's no browser which gets it right,
but that's just saying that nobody really gives a shit about standards,
and that it doesn't matter whether you adhere to them, so long as it works.
 
B

Bob Foster

Patrick TJ McPhee said:
% % > In article <[email protected]>,
% > % On Mon, 10 Nov 2003 19:08:45 +0100, Patrick TJ McPhee wrote:
% > % > Except that <br> is valid in HTML, while <br/> is not.
% > %
% > % Correct me if I'm wrong, but HTML 4.01 has a SHORTTAG YES clause in its
% > % SGML Declaration. Doesn't that mean that constructs like <br/> _are_
% > % allowed, and that a browser that doesn't read them just isn't fully
% > % conformant?
% >
% > Let me reword my previous statement. <br> does not mean the same thing
% > as <br/> in HTML. <br/> does not mean the same thing in xHTML as it
% > does in HTML.
%
% Don't just leave us hanging. What's the diff?
%
% I don't know of any modern browser that a) doesn't accept <br/> or b)
% appears to treat it different than <br>, but maybe there's some subtlety I'm
% missing wrt b.

There's no subtlety here. As has been pointed out, <br/> in HTML is the
same as <br>>. It may be that there's no browser which gets it right,
but that's just saying that nobody really gives a shit about standards,
and that it doesn't matter whether you adhere to them, so long as it
works.

If one gave a shit about standards one would not write, in two consecutive
postings:
<br> does not mean the same thing as <br/> in HTML
<br/> in HTML is the same as <br>

Bob Foster
 
J

Johannes Koch

Bob said:
If one gave a shit about standards one would not write, in two consecutive
postings:

Could you please read and quote properly? What Patrick did write was:

Note the '>>' after '<br'. So when rendered, the second should be a line
break and a '>' character and not a line break only.
 
B

Bob Foster

I do my best. If I misquoted, I apologize. The "give a shit" in his response
kinda set me off.

Bob
 
P

Patrick TJ McPhee

% I do my best. If I misquoted, I apologize. The "give a shit" in his response
% kinda set me off.

I'm sorry if I distressed you. I was giving my opionion of the `it
works, so what's the problem?' line of reasoning -- it really depends on
your attitude towards standards compliance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top