You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Anthony Pessy (JIRA)" <ji...@apache.org> on 2018/08/08 15:07:00 UTC
[jira] [Closed] (ANY23-386) Item's properties are in the wrong item
since the 2.2
[ https://issues.apache.org/jira/browse/ANY23-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony Pessy closed ANY23-386.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.3
This issue is fixed on the `2.3-SNAPSHOT`.
Failed to find a related issue before opening that one and was not aware of the availability of a SNAPSHOT version.
[~HansBrende] Is a release date for the `2.3` already set ?
I don't know how stable depending on the `2.3-SNAPSHOT` can be and I'm hesitating downgrading to the `2.1` in the mean time.
> Item's properties are in the wrong item since the 2.2
> -----------------------------------------------------
>
> Key: ANY23-386
> URL: https://issues.apache.org/jira/browse/ANY23-386
> Project: Apache Any23
> Issue Type: Bug
> Components: microdata
> Affects Versions: 2.2
> Reporter: Anthony Pessy
> Priority: Major
> Fix For: 2.3
>
>
> Given this HTML:
>
> {code:java}
> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
> </head>
> <body>
> <div itemscope itemtype="http://schema.org/Product">
> <span itemprop="name">Product Name</span>
> <div itemprop="review" itemscope itemtype="http://schema.org/Review">
> <span itemprop="name">Name</span> - by <span itemprop="author">Author</span>,
> <span itemprop="datePublished" content="2011-04-01">April 1, 2011</span>
> <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
> <span itemprop="worstRating" content="1"></span>
> <span itemprop="ratingValue">1</span>/<span itemprop="bestRating">5</span>stars
> </div>
> <span itemprop="description">Desc</span>
> </div>
> </div>
> </body>
> </html>
> {code}
>
>
> And the following Java:
>
> {code:java}
> List<Node> itemNodes = MicrodataParser.getTopLevelItemScopeNodes(document);
> MicrodataParser microdataParser = new MicrodataParser(document);
> System.out.println(microdataParser.getItemScope(itemNodes.get(0)).toJSON()));
> {code}
>
> The output of of the 2.1 was OK (I removed xpath/refs from output):
>
> {code:java}
> {
> "type": "http://schema.org/Product",
> "properties": [
> {
> "name": "review",
> "value": {
> "content": {
> "type": "http://schema.org/Review",
> "properties": [
> {
> "name": "datePublished",
> "value": {
> "content": "April 1, 2011",
> "type": "Plain"
> }
> },
> {
> "name": "author",
> "value": {
> "content": "Author",
> "type": "Plain"
> }
> },
> {
> "name": "name",
> "value": {
> "content": "Name",
> "type": "Plain"
> }
> },
> {
> "name": "description",
> "value": {
> "content": "Desc",
> "type": "Plain"
> }
> },
> {
> "name": "reviewRating",
> "value": {
> "content": {
> "type": "http://schema.org/Rating",
> "properties": [
> {
> "name": "bestRating",
> "value": {
> "content": "5",
> "type": "Plain"
> }
> },
> {
> "name": "ratingValue",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> },
> {
> "name": "worstRating",
> "value": {
> "content": "Null",
> "type": "Plain"
> }
> }
> ]
> },
> "type": "Nested"
> }
> }
> ]
> },
> "type": "Nested"
> }
> },
> {
> "name": "name",
> "value": {
> "content": "Product Name",
> "type": "Plain"
> }
> }
> ]
> }
> {code}
> But with the 2.2 the ratings's properties are directly in product:
>
> {code:java}
> {
> "type": "http://schema.org/Product",
> "properties": [
> {
> "name": "datePublished",
> "value": {
> "content": "2011-04-01",
> "type": "Plain"
> }
> },
> {
> "name": "bestRating",
> "value": {
> "content": "5",
> "type": "Plain"
> }
> },
> {
> "name": "review",
> "value": {
> "content": {
> "type": "http://schema.org/Review",
> "properties": [
> {
> "name": "datePublished",
> "value": {
> "content": "2011-04-01",
> "type": "Plain"
> }
> },
> {
> "name": "bestRating",
> "value": {
> "content": "5",
> "type": "Plain"
> }
> },
> {
> "name": "author",
> "value": {
> "content": "Author",
> "type": "Plain"
> }
> },
> {
> "name": "ratingValue",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> },
> {
> "name": "name",
> "value": {
> "content": "Name",
> "type": "Plain"
> }
> },
> {
> "name": "description",
> "value": {
> "content": "Desc",
> "type": "Plain"
> }
> },
> {
> "name": "reviewRating",
> "value": {
> "content": {
> "type": "http://schema.org/Rating",
> "properties": [
> {
> "name": "bestRating",
> "value": {
> "content": "5",
> "type": "Plain"
> }
> },
> {
> "name": "ratingValue",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> },
> {
> "name": "worstRating",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> }
> ]
> },
> "type": "Nested"
> }
> },
> {
> "name": "worstRating",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> }
> ]
> },
> "type": "Nested"
> }
> },
> {
> "name": "author",
> "value": {
> "content": "Author",
> "type": "Plain"
> }
> },
> {
> "name": "ratingValue",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> },
> {
> "name": "name",
> "value": {
> "content": "Product Name",
> "type": "Plain"
> }
> },
> {
> "name": "name",
> "value": {
> "content": "Name",
> "type": "Plain"
> }
> },
> {
> "name": "description",
> "value": {
> "content": "Desc",
> "type": "Plain"
> }
> },
> {
> "name": "reviewRating",
> "value": {
> "content": {
> "type": "http://schema.org/Rating",
> "properties": [
> {
> "name": "bestRating",
> "value": {
> "content": "5",
> "type": "Plain"
> }
> },
> {
> "name": "ratingValue",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> },
> {
> "name": "worstRating",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> }
> ]
> },
> "type": "Nested"
> }
> },
> {
> "name": "worstRating",
> "value": {
> "content": "1",
> "type": "Plain"
> }
> }
> ]
> }
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)