XML Gets Into Action (Sheets)Part 3
by Nate Zelnick For the HTML author, using this action sheet is incredibly easy. He or she can simply LINK to it in the same way he or she would LINK to a style sheet. As written above, the event only becomes available to an element that is assigned the "hilight" value using the generally available CLASS attribute of any element in HTML 4.0. Since Navigator doesn't support the full HTML DOM, it can't have events bubble up the object tree from children to parents in the way that IE 4.x and later will. Netscape promises better DOM compliance in its 5.0 version that will give it a better way to generalize events. So, if an author had a simple page with a headline and a paragraph of text and wanted to make both elements separately "highlightable", the HTML to call the Hilight.act action sheet might look like this:
<HTML> <HEAD> <TITLE>Action Sheet Demo</TITLE> <LINK REL="Actionsheet" TYPE="text/act" HREF="Hilight.act" </HEAD> <BODY> <H1 CLASS="hilight">This is the BIG headline</H1> <P CLASS="hilight">This is a bunch of greek text. This At this point, the Action Sheet proposal is an academic exercise. Although Microsoft tells me they whipped together an implementation of the spec as written shortly after it was released a few weeks ago, the final spec is likely to be a combination of what's been submitted by Netscape and the Behaviors proposal which Microsoft introduced in IE5. Behaviors has not been submitted to the W3C as a complete proposal because it builds on several projects in the works by the XML Activity Group. The largest difference between Behaviors and Action Sheets is that there is a public testbed for the former in the IE5 beta that came out in early July. It's also a little more complex and a little more powerful. I'll provide a thorough run-down on Behaviors next time.
is a bunch of greek text. This is a bunch of greek text.
This is a bunch of greek text.</P> </BODY> </HTML>
Contact the WebDeveloper.com® staff
Last modified: Friday, 25-Feb-2011 12:28:06 EST
| || |
Join Editor-in-Chief David Fiedler and find truth, justice, and a clue or two.