Mapping XML to XHTML - your recommendation for handling attributes?

Hi Folks,

 

I am mapping an XML document to XHTML.

 

Leaf nodes in the XML document I map to an XHTML <dl> element, e.g.,

 

<aircraft_elevation>12000</aircraft_elevation>

 

I map to:

 

<dl class="aircraft_elevation">

      <dt>Aircraft Elevation</dt>

      <dd>12000</dd>

</dl>

 

Now suppose <aircraft_elevation> has an attribute:

 

<aircraft_elevation units="meters">12000</aircraft_elevation>

 

How do you recommend I map the attribute?  

 

/Roger

Received on Saturday, 26 August 2006 21:31:10 UTC