On Thu, 08 Apr 2010 09:42:26 -0700
[email protected] wrote:

>  Jirka Kosek's message dated: Thu, 08 Apr 2010 10:27:10 +0200
> 
> > Ad point of generating empty <a/> elements -- empty <a> is valid
> > XHTML Strict. The problem is that such markup doesn't work properly
> > in some browsers that parse XHTML content as it was HTML content
> > (ie. not using XML parser).
> 
> I think one problem with <a/> is that the XHTML 1.0 standard says
> (4.3), "All elements other than those declared in the DTD as EMPTY
> must have an end tag. Elements that are declared in the DTD as EMPTY
> can have an end tag or can use empty element shorthand."  While the
> purpose of this is evidently to avoid things like '<p>...<p>...',
> in a strict (perhaps perverse?) sense it requires <a></a> instead of
> <a/>.

Read the xml spec. They are identical semantically. 


> 
> I have verified, for whatever it's worth, that Firefox will correctly
> render something in XHTML that includes an empty anchor expressed as
>    <a id="someId"></a>    but will display something erroneous if it
> is    <a id="someID"/>  , a somewhat surprising result.


Back to browser wars of years ago.
try <a id='x' />
which pleases most browsers that I've seen. Note the extra space.

HTH


-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to