This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: how to match <br/> tag
- From: "Andrew Welch" <awelch at piper-group dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 27 Jun 2002 17:10:47 +0100
- Subject: RE: [xsl] how to match <br/> tag
- Reply-to: xsl-list at lists dot mulberrytech dot com
> In this case, xhtml:br or html:{BR | Br | bR | br} is an empty
element, it
> cannot have any attributes or descendant entities as <br></br> does,
which
> has one (empty) text node.
Im not sure this is correct - <br></br> is the same as <br/> and
therefore has no children, not even a text() node - can anyone confirm?
cheers
andrew
-----Original Message-----
From: David Carlisle [mailto:davidc@nag.co.uk]
Sent: 27 June 2002 16:46
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] how to match <br/> tag
> "<br/> is a short form of <br></br>"
>
> But, be advised that thinking any element with no descendant elements
can be
> expressed this way, becase that's not true ... especially in the case
of the
> xhtml:br and possibly the html:{BR | Br | bR | br} element.
>
> Being able to express an element in the abbreviated manner is totally
> dependant on the intent of the given elements schema.
>
> In this case, xhtml:br or html:{BR | Br | bR | br} is an empty
element, it
> cannot have any attributes or descendant entities as <br></br> does,
which
> has one (empty) text node.
>
> So, with respect to xhtml or html, "br" cannot be of the form
<br></br>, it
> must be (ignoring casing/namespace) <br />.
>
> Because, <br></br> will not validate against the xhtml schema ... it
may be
> ok against the highly tolerant html schema--but, I'm not sure.
>
> -Jeff
No this is wrong. <xxx/> is in _all_ circumstances identical to
<xxx></xxx>
in XML irrespective of DTD or schema declarations. This equivalence is
clearly explicit in teh XML specification.
Some browsers can not cope with <br></br> but that is because the do not
parse XML and only tolerate it because they try to parse the XML as HTML
they silently ignore parse errors.
No DTD or schema validator (or XSLT processor) can distinguish <br/>
from <br></br>.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list