We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Custom Controls Examples

XHTML vs Escaped HTML

It looks like the XHTML example in Output Showing XHTML expects the bound node to be a string and reparses it, so it expects < entities in the value. Am I right or do I have a mistaken understanding?

I'd like to take a cue from ATOM (which offers text/plain, text/html, and application/xhtml+xml values) and extend the example so that it treats output/@mediatype='text/html' as the thing that reparses escaped HTML as a string, and treats output/mediatype="application/xhtml+xml" and accepts XHTML as the child of the bound node.

I've looked at this and it appears that in this section of code, this is a DOM Element for xf:output. I can't figure out where stringValue is defined, but it looks like I could somehow change

	// Get new value, parse, and import it.
	var val = this.stringValue;
	var newdom = this.domparser.parseFromString(val, "text/xml");
	var impnode = document.importNode(newdom.firstChild, true);

to the following, if only there were a way to get the bound node itself.

	// Get new value, and import it.
	var val = this.???;
	var impnode = document.importNode(val, true);

Is this possible and worthwhile?

Klotz 16:05, 24 April 2006 (PDT)

The definition of .stringValue is also a bit hidden. It is defined in the generic XBL interface.

Using the bound node should be possible, yes, and you can get the bound node by using the .getBoundNode() from the Custom Controls API.

beaufour 00:05, 25 April 2006 (PDT)

Document Tags and Contributors

Contributors to this page: Beaufour, Klotz
Last updated by: Beaufour,