|
Subject: Re: [xsl] <empty /> vs <empty></empty? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 11 Dec 2005 08:27:53 -0500 |
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"/>, not recognising that they both begin and *end* there, thinking instead they are opening tags only.
< ?xml version="1.0" encoding="utf-8"?>
< !DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns="http://www.w3.org/1999/xhtml">
< head>
< title>test< /title>
< meta http-equiv=
"Content-type" content='text/html; charset="utf-8"' />
< /head>
< body>
< div>Div is normal< /div>
< div style="font-style:italic">Div is italic< /div>
< div style="text-decoration:underline" />
< div>No underline< /div>
< div style="font-weight:bold">< /div>
< div>No underline or bold< /div>
< /body>
< /html>As a workaround, I believe I can do this:
<a name="x"><xsl:comment> empty </xsl:comment></a>
-- Upcoming XSLT/XSL-FO hands-on courses: Denver,CO March 13-17,2006 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] <empty /> vs <empty></empty?, Eric Scheid | Thread | RE: [xsl] <empty /> vs <empty></emp, Michael Kay |
| [xsl] <empty /> vs <empty></empty?, Eric Scheid | Date | RE: [xsl] <empty /> vs <empty></emp, Michael Kay |
| Month |