I'm putting together a simple XSL stylesheet so colleagues can preview XML that they are editing in their browser. One element has many different attribute values, each of which needs to be rendered differently.
<hi rend="b">
needs to be bold,
<hi rend="b i">
needs to be bold and italic, and so on.
What do I need to do in the XSL to make this happen?
I've done a good deal of Googling and haven't found a solution yet; perhaps it's a very basic question, but any help very gratefully received.
Because you wrote your colleagues preview XML in their browser I assume that you expect an XSLT-1.0 solution. The following templates copy the
hielement and replaces the attribute withbanditags. The copiedhitags are ignored by the browser.However, in this solution you have to create combinations of each attribute value.
Output: