microformats / tests

Microformats test suite
http://microformats.org/wiki/microformats2
Creative Commons Zero v1.0 Universal
64 stars 20 forks source link

incorrectly processing h-product #71

Open dissolve opened 7 years ago

dissolve commented 7 years ago

https://github.com/microformats/tests/blob/master/tests/microformats-v1/hproduct/aggregate.json

parses description as e-description, when http://microformats.org/wiki/h-product#Backward_Compatibility says to process it as p-descrpition

dissolve commented 7 years ago

I found another issue with this test as well. It seems to be changing class="review hreview-aggregate" to p-review h-review-aggregate

http://microformats.org/wiki/h-product#Backward_Compatibility says

review - including compat root class hreview in the absence of h-review

unless the wiki needs updating here, the child should have type h-review and h-review aggregate

dissolve commented 7 years ago

Finally inside that same h-review-aggregate, it is not properly grabbing the value it should be using the value-class parsing

gRegorLove commented 6 years ago

I believe the backcompat for review hreview-aggregate should be p-review h-review h-review-aggregate.

What's the expected h-review-aggregate.value?

willnorris commented 6 years ago

I would find it confusing that review hreview-aggregate becomes p-review h-review hreview-aggregate, being both a review and an aggregate review. http://microformats.org/wiki/hproduct is clear that its review field is expected to be either h-review OR hreview-aggregate.

I would imagine that the intent of the backcompat note is that if a review property of an hproduct has no explicit root class (either hreview or hreview-aggregate), then treat is as though it were hreview. If that is true, then perhaps the note should be updated to read:

review - include compat root class h-review in the absence of hreview or hreview-aggregate

willnorris commented 6 years ago

though I guess that hreview and hreview-aggregate are similar enough that it might not matter to have a microformat with both types?

gRegorLove commented 6 years ago

@willnorris I think you're right with your first comment. I was thinking of it too literally, "first upgrade the review, then the hreview-aggregate," without considering the contents. The content is definitely an aggregate, so p-review h-review-aggregate makes sense.

I'll discuss updating the h-product spec separately.