[uf-discuss] XMDP Definitions

Tantek Ç elik tantek at cs.stanford.edu
Thu Feb 9 23:43:12 PST 2006


On 2/9/06 8:35 PM, "Ryan Cannon" <ryan at ryancannon.com> wrote:

> The XMDP Spec says very little about the content of descriptions.

Actually, it's quite explicit, see below.


> Can  
> a term be defined with both a text description and an explicit list
> of properties?

Yes.


> If so, should this be marked up as:
> 
> <dl class="profile"
>  <dt id="property">Property</dt>
>    <dd>This property should be used in this way. Multiple values
> may be specified by a space-separated list.</dd>
>    <dd><dl>
>      <dt id="valueOne">
>        <dd>Value one is special</dd>
>      <dt id="valueTwo">
>        <dd>Value Two is more special</dd>
>    </dl></dd>
> </dl>
> 
> Or:
> 
> <dl class="profile"
>  <dt id="property">Property</dt>
>    <dd>This property should be used in this way. Multiple values
> may be specified by a space-separated list.
>      <dl>
>        <dt id="valueOne">
>          <dd>Value one is special</dd>
>        <dt id="valueTwo">
>          <dd>Value Two is more special</dd>
>      </dl>
>    </dd>
> </dl>
> 
> Cheers,

http://gmpg.org/xmdp/description#format  describes in order:


 <dt id='property1'>property1</dt>
 <dd>

The property name is given an 'id' attribute so pages can reference the
property in particular with a URL with the appropriate fragment identifier.
The 'id' attribute need not be the same as the name of the property, but
probably should be for the sake of simplicity.

Any amount of valid optional markup (except for definition lists of course)
may be used to provide a prose description and/or references for the
property.


  <p>Authors may use property1 to describe
   some particular details.
  </p>

One or more nested definition list(s) for the values and their definitions.
If the values do not form a discrete set, or if that set should be too large
to practically enumerate, a simple prose description of the set of legal
values and any type constraints will suffice.


  <dl>
   <dt id='value1'>value1</dt>
    <dd>definition of value1</dd>
   <dt id='value2'>value2</dt>
    <dd>definition of value2</dd>
   ...
  </dl>
  ...
 </dd>




Thus, appending just the markup:

 <dt id='property1'>property1</dt>
 <dd>
  <p>Authors may use property1 to describe
   some particular details.
  </p>
  <dl>
   <dt id='value1'>value1</dt>
    <dd>definition of value1</dd>
   <dt id='value2'>value2</dt>
    <dd>definition of value2</dd>
   ...
  </dl>
  ...
 </dd>


You see that the latter of the two examples that Ryan gives is the correct
one according to the XMDP spec.

Tantek



More information about the microformats-discuss mailing list