[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: how to match <br/> tag

Subject: RE: how to match <br/> tag
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Thu, 27 Jun 2002 17:26:20 +0100
RE:  how to match <br/> tag
That was good - somehow I managed to reply to David's post... (which
contained the answer I was looking for anyway)

oh well :)


-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: 27 June 2002 16:46
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.