[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl]
Re: [xsl] vs
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?
yes.
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
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:http://www.w3.org/TR/xslt-xquery-serialization/>.
More exactly: http://www.w3.org/TR/xslt-xquery-serialization/#xhtml-output
[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.
e.
Current Thread
- [xsl] <empty /> vs <empty></empty?
- Eric Scheid - Sun, 11 Dec 2005 14:21:49 +1100
- G. Ken Holman - Sun, 11 Dec 2005 08:27:53 -0500
- Michael Kay - Sun, 11 Dec 2005 15:36:23 -0000
- drkm - Sun, 11 Dec 2005 16:44:38 +0100 (CET)
- Eric Scheid - Mon, 12 Dec 2005 07:33:51 +1100 <=
- drkm - Sun, 11 Dec 2005 22:40:50 +0100 (CET)
- Michael Kay - Mon, 12 Dec 2005 00:02:31 -0000
- <Possible follow-ups>
- Eric Scheid - Mon, 12 Dec 2005 12:58:40 +1100
- drkm - Mon, 12 Dec 2005 11:21:54 +0100 (CET)
<- Previous Index Next ->
RE: [xsl] <empty /> vs <empty></emp, drkm
Thread
Re: [xsl] <empty /> vs <empty></emp, drkm
[xsl] xsl split string, Philippe LAPLANCHE
Date
RE: [xsl] xsl split string, Philippe LAPLANCHE
Month
Subject: Re: [xsl] <empty /> vs <empty></empty? From: Eric Scheid <eric.scheid@xxxxxxxxxxxxxxx> Date: Mon, 12 Dec 2005 07:33:51 +1100 |
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] <empty /> vs <empty></emp, drkm | Thread | Re: [xsl] <empty /> vs <empty></emp, drkm |
[xsl] xsl split string, Philippe LAPLANCHE | Date | RE: [xsl] xsl split string, Philippe LAPLANCHE |
Month |