RE: [xsl] tag minimisation

Subject: RE: [xsl] tag minimisation
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Wed, 11 Sep 2002 12:44:12 +0100
> > I wouldn't write a literal result element such as <br /> as 
> <br></br>,
> > so if the serialiser left that as <br /> all would be well.
> 
> But the serialise wouldn't know how you'd written it as it 
> wouldn't have
> been reported by the parser.
> 
> > I guess it all comes down to if the serialiser can 
> distinguish between
> > <foo/> and <foo></foo>.
> 
> It can't as the serialiser is using the result of an XML parse, and an
> XML parser is required to not distinguish these.

So, just to be clear, the serialiser would see:

(if <bar> was empty/omitted) 

<div><xsl:apply-templates select="bar"/></div>

as <div/>?

It wouldn't see <div></div> and then decide to ouput <div/> depending on
output method?

Im pretty sure its the latter.

In which case it can decide not to, regardless of dtd.  It may not be
wholly correct, but neither are other extensions that prove really
useful.


cheers
andrew



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
 

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


Current Thread