[xsl] Creating Nested Structure Based on Attributes

Subject: [xsl] Creating Nested Structure Based on Attributes
From: Jeff Sese <jsese@xxxxxxxxxxxx>
Date: Mon, 19 Mar 2007 17:25:02 +0800
Hi,

I have elements that have the following attributes:
- font-style
- font-variant
- font-weight
- text-underline-style
- vertical-alignment

however these attributes may or may not be all present in an element. How can I create a structure output based on this attributes:

example source:

<inline font-style="italic" font-variant="small-caps" font-weight="bold" vertical-alignment="superscript">text</inline>

desired output:

<inline>
   <emphasis format="italic">
       <emphasis format="smallcaps">
           <emphasis format="bold">
               <superscript>text</superscript>
           </emphasis>
       </emphasis>
   </emphasis>
</inline>

Thanks,
--
*Jeff Sese*

Current Thread