Jump to content

[XHTML] name attribute


Jack McKalling
 Share

Recommended Posts

In Xhtml tutorial, it says the "name" attribute has been replaced by the "id" attribute. In HTML4 specification also I guess.In Xhtml it is not prohibited to use HTML forms instead of Xforms. But in there, in HTML forms the "name" attribute is all over the place :) What to do with it?What does the replacement mean for the use of it in HTML forms when using Xhtml transitional?

Link to comment
Share on other sites

You can use the name attributes for forms.It may seem weird but remember that forms are getting pretty outdated (and soon replaced with XForms), so that's why they have their own exceptions (like textarea absolutely needing cols and rows even if we could use CSS instead).

Link to comment
Share on other sites

I understand, but I won't use Xforms unless I turn over from Xhtml to Xml :)Xml is too difficult for me yet because of its stylesheets that are not in CSS, but even another language.And Html Forms don't need another language. :)Xforms is just more Xml then Xhtml...

Link to comment
Share on other sites

Indeed :)Xml is harder than Xhtml yes, but different. Xhtml is for (with cooperating CSS) both structure, content and style.Xml on the other hand, is for structure and content only (but you might use some CSS similar language)Xml is not like Html a translation of a page, but more an arrangement of its content. That would mean different elements are not in the axact order, order is not important.For that, it is completely different to Html languages we are used to, and if I would turn over to that one I even have to learn the styling language too... That is two languages at the same time, no good :(use Xhtml instead, with easy CSS :)

Link to comment
Share on other sites

Guest Bellamy
I understand, but I won't use Xforms unless I turn over from Xhtml to Xml :)Xml is too difficult for me yet because of its stylesheets that are not in CSS, but even another language.And Html Forms don't need another language. :)Xforms is just more Xml then Xhtml...

"It is important to understand that XML is not a replacement for HTML. In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data." -- words of w3schools.com
Link to comment
Share on other sites

  • 1 month later...
"It is important to understand that XML is not a replacement for HTML. In future Web development it is most likely that XML will be used to describe the data, while HTML will be used to format and display the same data." -- words of w3schools.com

I'm gonnna sound a bit ignorant here but I'm gonna say it anyway.XML is no more difficult than HTML, you just don't get away with mistakes.XSL is fantastic for laying out documents and can carry all the functionality of HTML and more (and you have to do it correctly which is a bonus). As a web novice I'm sure I'll find pitfalls sooner or later, but so far it seems pretty cool.I think every web programmer should try it. :)
Link to comment
Share on other sites

I've done both - xml is easy xsl is hard.Given the difficulty I had picking up XSL, I went back to HTML and Cold Fusion to parse my XML documents.I couldn't imagine writing this in XSL:http://www.iribbit.net/news.cfmI know . . . I'm procrastinating learning XSL.I know . . . I'm shooting myself in the foot right? :)

Link to comment
Share on other sites

http://www.w3.org/MarkUp/http://www.w3.org/Style/CSS/XHTML 2.0http://www.w3.org/TR/xhtml2/mod-hyperAttri...tributes_targetWarning: Long read ahead... :)Looks like they're putting the target attribute back into xhtml. Finally. Never understood why they took that out of xhtml 1.0 strict and 1.1...

Link to comment
Share on other sites

I think target is allowed with the Frameset DTD. And we all know frames are bad...Then, you could also use it to open up new windows, but we also know how bad that is. And Javascript is just the way to go on the matter anyway since HTML's job is not to control browser events.So there isn't much need for target right now. We'll be getting XFrames eventually...

Link to comment
Share on other sites

I think target is allowed with the Frameset DTD. And we all know frames are bad...
It's also allowed in Transitional. And frames are baaaad... :) No, seriously, they stink.
Then, you could also use it to open up new windows, but we also know how bad that is. And Javascript is just the way to go on the matter anyway since HTML's job is not to control browser events.
Why is opening up a new window with target="" bad? Like target="_blank"?
So there isn't much need for target right now. We'll be getting XFrames eventually...

XFrames, yeah. But what about <base target="" />? Can't that be used?
Link to comment
Share on other sites

name or id? Doesn't matter.both are accessible from javascript for validation, just done 2 different ways, instead of document.form.name.value it is document.getElementById("id").value.Besides I can't see XML replacing XHTML for layout of a webpage. It is better suited for things like RSS Feeds and Web Control component attributes.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...