Hi All,
I see that the name attribute is being phased out in xhtml 1.1 what can be used instead the, id attribute does not work when trying to create a target for a link or some such thing. It can be done using id and jscript but this defeats the object for those 13% or so of people who have non jscript compliant browsers. any thoughts?
thanksUse XHTML 1.0 Transitional then or JavasScript or eXtensibilty to introduce the target attribute into XHTML 1.1 but if you aren't serving 1.1 as an application of XHTML use XHTML 1.0 Transitional.I agree. From the XHTML 1.0 Recommendation (<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/#C_8">http://www.w3.org/TR/xhtml1/#C_8</a><!-- m -->):
In XML, URI-references [RFC2396] that end with fragment identifiers of the form "#foo" do not refer to elements with an attribute name="foo"; rather, they refer to elements with an attribute defined to be of type ID, e.g., the id attribute in HTML 4. Many existing HTML clients don't support the use of ID-type attributes in this way, so identical values may be supplied for both of these attributes to ensure maximum forward and backward compatibility (e.g., <a id="foo" name="foo">...</a>)
Summary: for now, use XHTML 1.0 Transitional with both name and ID attributes. When browsers support it, ID will be the correct method. Or you could reintroduce the attribute, as Robert suggested, but that's a bit more work.
Adam
I see that the name attribute is being phased out in xhtml 1.1 what can be used instead the, id attribute does not work when trying to create a target for a link or some such thing. It can be done using id and jscript but this defeats the object for those 13% or so of people who have non jscript compliant browsers. any thoughts?
thanksUse XHTML 1.0 Transitional then or JavasScript or eXtensibilty to introduce the target attribute into XHTML 1.1 but if you aren't serving 1.1 as an application of XHTML use XHTML 1.0 Transitional.I agree. From the XHTML 1.0 Recommendation (<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/#C_8">http://www.w3.org/TR/xhtml1/#C_8</a><!-- m -->):
In XML, URI-references [RFC2396] that end with fragment identifiers of the form "#foo" do not refer to elements with an attribute name="foo"; rather, they refer to elements with an attribute defined to be of type ID, e.g., the id attribute in HTML 4. Many existing HTML clients don't support the use of ID-type attributes in this way, so identical values may be supplied for both of these attributes to ensure maximum forward and backward compatibility (e.g., <a id="foo" name="foo">...</a>)
Summary: for now, use XHTML 1.0 Transitional with both name and ID attributes. When browsers support it, ID will be the correct method. Or you could reintroduce the attribute, as Robert suggested, but that's a bit more work.
Adam