devxlogo

Embed XSL in Behaviors

Browsers Targeted: Internet Explorer 5

Behaviors let you create specific functionality within custom HTML tags. XSL (Extensible Stylesheet Language) lets you transform a block of XML into some form of output, including HTML. The two would seem to be ideally suited for one another, but hauling around an XSL file reference begins to weaken the power of such a combination. However, a nice feature of behaviors is that you can embed HTML within them, and more specifically, you can embed XML data islands inside of a behavior. Once embedded, you can retrieve the data island using its id property, then use XMLDocument to retrieve a reference to the XML document contained within.

For example, consider a behavior that takes a generic list of elements within a container element. The behavior will convert such a list into a selection list box, with the id of the container becoming the id of the

See also  How Engineering Leaders Spot Weak Proposals

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.