Sniffy Posted December 23, 2006 Share Posted December 23, 2006 I went throught the (x)html tutorial a bit, and I read that the name attribute is not supported, and that you should use id instead.But what if your using the post form method in PHP?Does PHP recognize the 'id' attribute from the form, or what do I use? Link to comment Share on other sites More sharing options...
boen_robot Posted December 23, 2006 Share Posted December 23, 2006 Not that it's not "supported" but it's "deprecated" in more recent versions (XHTML 1.1). I think PHP recognizes elements by ID. Try it for yourself to be sure. If not, using name is not wrong, as long as you're using XHTML 1.0, not XHTML 1.1. Link to comment Share on other sites More sharing options...
Sniffy Posted December 23, 2006 Author Share Posted December 23, 2006 So, if it comes down to it, I can just change my <!DOCTYPE ...> to HTML 1.0 strict? Link to comment Share on other sites More sharing options...
boen_robot Posted December 23, 2006 Share Posted December 23, 2006 Practically speaking... yes. Link to comment Share on other sites More sharing options...
Sniffy Posted December 23, 2006 Author Share Posted December 23, 2006 Okay, thanks for the help, again. Link to comment Share on other sites More sharing options...
Jonas Posted December 23, 2006 Share Posted December 23, 2006 This is really a transition period of sorts, it's recommended using both when dealing with forms, because form elements still use the name attribute. The thing is, forms like they are today are, I think, supposed to be replaced by XForms, but that still has some time to go before becoming a standard and supported by all browsers. After html forms are outdated, so will the name attribute. Link to comment Share on other sites More sharing options...
Sniffy Posted December 23, 2006 Author Share Posted December 23, 2006 XForms huh?The replacement sucessor in XHTML 2.0, interesting.I had a quick look at the tutorial.So it's new tags added by the W3C for more open form use? Link to comment Share on other sites More sharing options...
boen_robot Posted December 24, 2006 Share Posted December 24, 2006 Not exactly. It's a completely new specification with it's own new elements ("tag" is not the same as "element"). It is designed to be embedded in all XML based languages for gathering data, taking XHTML and SVG as a priority. Link to comment Share on other sites More sharing options...
Sniffy Posted December 24, 2006 Author Share Posted December 24, 2006 So I'll be able to use it in XHTML? Link to comment Share on other sites More sharing options...
boen_robot Posted December 24, 2006 Share Posted December 24, 2006 You can even use it in XHTML 1, after adding the namespace, but there are two problems:1. DTDs are not namespace aware, because they were made for SGML, which doesn't have namespaces. Because of all this, your XHTML will be invalid.2. There aren't many user agents with XForms support. The only one I know is XSmiles. All others requre a plug-in, that is different for each one.In XHTML 2.0, XForms will be added to the core, that is, the DTD, making all XHTML 2 using XForms valid.I really hope for the sake of modular XHTML development, that future specifications, including XHTML 2.0 will be using RelaxNG or better yet- XML Schema to declare the grammer, scince those languages were made specifically for XML. This will enable XHTML files to be valid, even when they use extensions with namespaces. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now