473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

<br/> and xslt

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?
Jul 20 '05 #1
9 5863
In article <pa****************************@hotmail.com>, one of infinite monkeys
at the keyboard of "Oliver M. Haynold" <ol*********@hotmail.com> wrote:

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.

--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
Jul 20 '05 #2
In article <pa****************************@hotmail.com>,
Oliver M. Haynold <ol*********@hotmail.com> wrote:
% 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.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #3
"Patrick TJ McPhee" <pt**@interlog.com> wrote in message
news:bp**********@news.eusc.inter.net...
In article <pa****************************@hotmail.com>,
Oliver M. Haynold <ol*********@hotmail.com> wrote:
% 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.

Bob Foster
Jul 20 '05 #4
"Nick Kew" <ni**@fenris.webthing.com> wrote in message
news:57***********@jarl.webthing.com...
In article <pa****************************@bofh.at>, one of infinite monkeys at the keyboard of Bernd Petrovitsch <be***@bofh.at> wrote:
<br/> *is* legal HTML.


Nonsense.

Well, except by abbreviated SGML rules that no browser supports, whereby
it resolves to <br>> (yes, the two closing ">"s are not a typo). That's
legal wherever a bare > is legal.


What's nonsense is fussing about what is legal HTML. The horse has left the
barn on this one. The only thing that matters is what browsers accept.

The browsers I am familiar with, which would be IE, Mozilla, Safari, accept
<br/> as well as <br>.

Bob Foster
Jul 20 '05 #5
In article <gIeub.226716$HS4.1974234@attbi_s01>,
Bob Foster <bo********@comcast.net> wrote:
% "Patrick TJ McPhee" <pt**@interlog.com> wrote in message
% news:bp**********@news.eusc.inter.net...
% > In article <pa****************************@hotmail.com>,
% > Oliver M. Haynold <ol*********@hotmail.com> wrote:
% > % 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.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #6
"Patrick TJ McPhee" <pt**@interlog.com> wrote in message
news:bp**********@news.eusc.inter.net...
In article <gIeub.226716$HS4.1974234@attbi_s01>,
Bob Foster <bo********@comcast.net> wrote:
% "Patrick TJ McPhee" <pt**@interlog.com> wrote in message
% news:bp**********@news.eusc.inter.net...
% > In article <pa****************************@hotmail.com>,
% > Oliver M. Haynold <ol*********@hotmail.com> wrote:
% > % 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
Jul 20 '05 #7
Bob Foster wrote:
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>


Could you please read and quote properly? What Patrick did write was:
"Patrick TJ McPhee" <pt**@interlog.com> wrote in message
news:bp**********@news.eusc.inter.net...
As has been pointed out, <br/> in HTML is the
same as <br>>.


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

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #8
I do my best. If I misquoted, I apologize. The "give a shit" in his response
kinda set me off.

Bob

"Johannes Koch" <ko**@w3development.de> wrote in message
news:bp*************@ID-61067.news.uni-berlin.de...
Bob Foster wrote:
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>


Could you please read and quote properly? What Patrick did write was:
> "Patrick TJ McPhee" <pt**@interlog.com> wrote in message
> news:bp**********@news.eusc.inter.net...
>>As has been pointed out, <br/> in HTML is the
>>same as <br>>.


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

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #9
In article <P2pvb.202849$275.751333@attbi_s53>,
Bob Foster <bo********@comcast.net> wrote:
% 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.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Son KwonNam | last post by:
I'm working with XSLT for changing XML to XSLT. for example, I have the follower xml data --------- <article writer="you"> <contents><!]></contents> --------- then I want to get the...
4
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my...
6
by: Lasse | last post by:
I have done this simple function, it seems to work as intended, to solve a problem i have had for a while. I couldnt find any sample around that was working for me. I would like to test it with...
7
by: noor.rahman | last post by:
I have an XML file that stores data from an HTML form. I use XSL to display the data in HTML format. The data may have newline characters. However, XSL is not displaying the newlines properly in...
2
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
1
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
6
by: JoeS | last post by:
I'm new to XSLT, it what our old website developer used but he has now left our company. I have been given the task of making our site output as valid XHTML as I can get it. Currently in the .XSL...
7
by: Nathan Sokalski | last post by:
Something that I recently noticed in IE6 (I don't know whether it is true for other browsers or versions of IE) is that it renders <br/and <br></br> differently. With the <br/version, which is what...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.