Return-Path: X-Original-To: apmail-incubator-any23-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-any23-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 508ACC749 for ; Mon, 30 Apr 2012 11:17:09 +0000 (UTC) Received: (qmail 20974 invoked by uid 500); 30 Apr 2012 11:17:09 -0000 Delivered-To: apmail-incubator-any23-user-archive@incubator.apache.org Received: (qmail 20891 invoked by uid 500); 30 Apr 2012 11:17:07 -0000 Mailing-List: contact any23-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: any23-user@incubator.apache.org Delivered-To: mailing list any23-user@incubator.apache.org Received: (qmail 20865 invoked by uid 99); 30 Apr 2012 11:17:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 11:17:06 +0000 X-ASF-Spam-Status: No, hits=2.6 required=5.0 tests=HTML_MESSAGE,NO_RDNS_DOTCOM_HELO,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.145.54.172 is neither permitted nor denied by domain of tep@yahoo-inc.com) Received: from [216.145.54.172] (HELO mrout2.yahoo.com) (216.145.54.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 11:16:57 +0000 Received: from IRD-EX07CAS01.ds.corp.yahoo.com (ird-ex07cas01.corp.ird.yahoo.com [77.238.176.71]) by mrout2.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id q3UBFQ62087105 for ; Mon, 30 Apr 2012 04:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1335784578; bh=qLbvZ0Jki3kDgkvyIE1Tr4du+2BmNDmDLI5eJGSPj1k=; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; b=a035RVG+HikaotzMwftfafRNMvGW1t7+hsZRXbX+ZWnE9mo6fuXLC1DLvPEV/pzab gIuSVCY4AXjvgG3GMyCBTrthIE8XX+CNQD1fVBaLghOTf62S7FJeVOmg0orPzF0lK4 ho6dYMwJoi64Clx0BOl12/i6brICO+c7+HeldKqI= Received: from IRD-EX07VS01.ds.corp.yahoo.com ([77.238.176.68]) by IRD-EX07CAS01.ds.corp.yahoo.com ([77.238.176.79]) with mapi; Mon, 30 Apr 2012 12:16:00 +0100 From: Tim Potter To: "any23-user@incubator.apache.org" Date: Mon, 30 Apr 2012 12:15:59 +0100 Subject: Mircodata empty content handling. Thread-Topic: Mircodata empty content handling. Thread-Index: Ac0mwp8lOs/qFcqHQtaNrb756bEyvg== Message-ID: Accept-Language: es-ES, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.1.120420 acceptlanguage: es-ES, en-US Content-Type: multipart/alternative; boundary="_000_CBC4410F4651tepyahooinccom_" MIME-Version: 1.0 --_000_CBC4410F4651tepyahooinccom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, We've noticed that while extracting Microdata propItems, elements with m= issing, empty or whitespace string values results in an IllegalArgumentExce= ption being thrown. HTML that trigger this could be one of: The code explicitly check for this condition in ItemPropValue.itemPropValue= (): if(content instanceof String && ((String) content).trim().length() =3D=3D 0= ) { throw new IllegalArgumentException("Invalid content '" + content + "'")= ; } Is this correct behavior? Is it not possible that some properties could le= gally have an empty string as a value? I looked at the RFC and it seems th= at having no value should be treated as an empty string, but it doesn't sta= te that empty values are illegal. http://www.w3.org/TR/html5/microdata.html#values Regards, Tim P. --_000_CBC4410F4651tepyahooinccom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi, 
   We've noticed that while extracting Microdata= propItems, elements with missing, empty or whitespace string values result= s in an IllegalArgumentException being thrown.

=
HTML that trigger this could be one of:

=
<sp= an itemprop=3D"nameA"></span>

<meta itemprop=3D"nameB">


<me= ta itemprop=3D"nameC" content=3D"  ">=
 
The code explicitly check for this c= ondition in ItemPropValue.itemPropValue():

if(content instanceof String && ((String) content).trim().leng= th() =3D=3D 0) {

    throw ne= w IllegalArgumentException("Invalid content '" + content + "'");

}


Is this correct behavior?  Is it not possi= ble that some properties could legally have an empty string as a value? &nb= sp;I looked at the RFC and it seems that having no value should be treated = as an empty string, but it doesn't state that empty values are illegal.


=
Regards,
  Tim P.
--_000_CBC4410F4651tepyahooinccom_--