Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: Mapping XML to XHTML - your recommendation for handling attributes?

From: Karl Dubost <karl@w3.org>
Date: Mon, 28 Aug 2006 09:20:12 +0900
Message-Id: <99279261-C8C5-4E79-A8A8-1B77CCAD72C0@w3.org>
Cc: <www-html@w3.org>
To: "Costello, Roger L." <costello@mitre.org>


Le 27 août 06 à 06:31, Costello, Roger L. a écrit :
> Leaf nodes in the XML document I map to an XHTML <dl> element, e.g.,

"dl" element is not appropriate for what you are doing.
dl means "definition list" aka a list of definitions.

> <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?

For each things you decide in a markup language or on how to model  
data, you have to ask yourself first.
	What do you want to do?

* What will be the benefits for you to have these data expressed in  
an XHTML 1.0 page?
* Do you have specific needs for making these data accessible online  
in a predefined format?
* Is there a community which will be interested in grabbing semi- 
formatted data in your XHTML more than an RDF file or an XML file?


(A side note: "meters" is not strictly a unit "m" is one expressing  
meters.)

Some suggestions:

<span title="aircraft elevation">12000 meters</span>


or if you really need more expressiveness

<span title="aircraft elevation">12000 <span title="meters">m</span></ 
span>



You can look at
   GRDDL: Gleaning Resource Descriptions from Dialects of Languages
   http://www.w3.org/TeamSubmission/grddl/ 
if you want to grab data from an XHTML 1.0 page in a consistent way.

You might be able to use RDFa in XHTML 2.0 (but still a WD then  
highly subject to changes)


PS: Maybe a better list would have been public-evangelist@w3.org



-- 
Karl Dubost - http://www.w3.org/People/karl/ 
W3C Conformance Manager, QA Activity Lead
   QA Weblog - http://www.w3.org/QA/ 
      *** Be Strict To Be Cool ***
Received on Monday, 28 August 2006 00:20:17 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.