microformats / microformats2-parsing

For collecting and handling issues with the microformats2 parsing specification: http://microformats.org/wiki/microformats2-parsing
14 stars 6 forks source link

Use dt-* property from a nested microformat as the value for a parent dt-* property #71

Open Zegnat opened 1 year ago

Zegnat commented 1 year ago

If an element that is being parsed is both a property and a microformat, values are extracted for the property. In spec look for: “if that child element itself has a microformat ("h-*" or backcompat roots) and is a property element”.

I would expect dt- properties to get a value based on a dt- property within the nested microformat.

Change proposal:

(Only the second to last step is new.)

Zegnat commented 1 year ago

Example on my website of using a nested h-event microformat on a dt- property (excerpt):

<div class="h-card">
  <p>In 
    <data class="dt-bday h-event">
        <time class="dt-start dt-end" datetime="1991-10-23T20:09:00+01:00">360 days</time>
        <data class="p-location h-card">
            <data class="p-name" value="Ziekenhuis St Jansdal"></data>
            <data class="u-url" value="https://www.stjansdal.nl/patienten-en-bezoekers/locaties/ziekenhuis-st-jansdal-harderwijk"></data>
            <data class="p-street-address" value="Wethouder Jansenlaan 90"></data>
            <data class="p-postal-code" value="3844 DG"></data>
            <data class="p-locality" value="Harderwijk"></data>
            <data class="p-country-name" value="The Netherlands"></data>
        </data>
    </data>
  </p>
</div>