Re: [xsl] <empty /> vs <empty></empty?

Subject: Re: [xsl] <empty /> vs <empty></empty?
From: Eric Scheid <eric.scheid@xxxxxxxxxxxxxxx>
Date: Mon, 12 Dec 2005 07:33:51 +1100
On 12/12/05 2:44 AM, "drkm" <darkman_spam@xxxxxxxx> wrote:

>> Is there any way to control whether empty elements appear as
>> <empty></empty>, instead of <empty/>?
>> My problem is that some browsers don't like <div/> or
>> <a name="x"/>,
> Browser?  So you use 'xhtml' or 'html' serialization method, don't
> you?


<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />

> If it's the case, you must don't get any element serialized as
> "<empty/>" (but as "<empty></empty>" or "<empty>").
> See <URL:>.

More exactly:

    [Definition: The following XHTML elements have an EMPTY content model:
    area, base, br, col, hr, img, input, link, meta, basefont, frame,
    isindex, and param.] Given an empty instance of an XHTML element whose
    content model is not EMPTY (for example, an empty title or paragraph)
    the serializer MUST NOT use the minimized form. That is, it MUST output
    <p></p> and not <p />.

So, it would seem the serialiser I'm using is defective, yes? Sadly, I don't
think I have a choice in the matter, since I'm using the built in XSLT
functionality of Filemaker.


Current Thread