Hello,
our stanbol (full-war checked out from today) has problems when I feed the 
enhancer queries containing html tags containing points.
Our referenced site/sesame will complain about wrongly (not escaped) dots.
For example this text sent to the enhancer:
        <b>from 9 a.m. - 4 p.m.</b>
Will generate this request:

http://localhost:8090/openrdf-sesame/repositories/stanbol?query=CONSTRUCT+%7B+%0A++?id+%3Chttp://www.w3.org/2003/01/geo/wgs84_pos%23long%3E+?v_1+.%0A++?id+%3Chttp://xmlns.com/foaf/0.1/depiction%3E+?v_2+.%0A++?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+?v_4+.%0A++?id+%3Chttp://stanbol.apache.org/ontology/entityhub/entityhub%23entityRank%3E+?v_3+.%0A++?id+%3Chttp://dbpedia.org/ontology/thumbnail%3E+?v_5+.%0A++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23comment%3E+?v_6+.%0A++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?v_7+.%0A++?id+%3Chttp://www.w3.org/2003/01/geo/wgs84_pos%23lat%3E+?v_8+.%0A++%3Chttp://stanbol.apache.org/ontology/entityhub/query%23QueryResultSet%3E+%3Chttp://stanbol.apache.org/ontology/entityhub/query%23queryResult%3E+?id+.+%0A%7D+WHERE+%7B+%0A++%7B+%0A++++?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23label%3E+?v_7++%0A++++++FILTER(regex(str(?v_7),%22%5Ep%5C.m%5C.$%22,%22i%22)+%7C%7C+regex(str(?v_7),%22%5E%3C/b%3E$%22,%22i%22)+%26%26+((lang(?v_7)+%3D+%22%22)+%7C%7C+(lang(?v_7)+%3D+%22en%22)))+.+%0A++%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/2003/01/geo/wgs84_pos%23long%3E+?v_1+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://xmlns.com/foaf/0.1/depiction%3E+?v_2+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/1999/02/22-rdf-syntax-ns%23type%3E+?v_4+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://stanbol.apache.org/ontology/entityhub/entityhub%23entityRank%3E+?v_3+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://dbpedia.org/ontology/thumbnail%3E+?v_5+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/2000/01/rdf-schema%23comment%3E+?v_6+.+%7D+%0A++OPTIONAL+%7B+?id+%3Chttp://www.w3.org/2003/01/geo/wgs84_pos%23lat%3E+?v_8+.+%7D+%0A%7D+%0ALIMIT+12+%0A&format=application/rdf%2Bxml

Or 

http://localhost:8090/openrdf-sesame/repositories/stanbol?query=CONSTRUCT { 
  ?id <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?v_1 .
  ?id <http://xmlns.com/foaf/0.1/depiction> ?v_2 .
  ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v_4 .
  ?id <http://stanbol.apache.org/ontology/entityhub/entityhub#entityRank> ?v_3 .
  ?id <http://dbpedia.org/ontology/thumbnail> ?v_5 .
  ?id <http://www.w3.org/2000/01/rdf-schema#comment> ?v_6 .
  ?id <http://www.w3.org/2000/01/rdf-schema#label> ?v_7 .
  ?id <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?v_8 .
  <http://stanbol.apache.org/ontology/entityhub/query#QueryResultSet> 
<http://stanbol.apache.org/ontology/entityhub/query#queryResult> ?id . 
} WHERE { 
  { 
    ?id <http://www.w3.org/2000/01/rdf-schema#label> ?v_7  
      FILTER(regex(str(?v_7),"^p\.m\.$","i") || regex(str(?v_7),"^</b>$","i") 
&& ((lang(?v_7) = "") || (lang(?v_7) = "en"))) . 
  } 
  OPTIONAL { ?id <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?v_1 . } 
  OPTIONAL { ?id <http://xmlns.com/foaf/0.1/depiction> ?v_2 . } 
  OPTIONAL { ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?v_4 . } 
  OPTIONAL { ?id 
<http://stanbol.apache.org/ontology/entityhub/entityhub#entityRank> ?v_3 . } 
  OPTIONAL { ?id <http://dbpedia.org/ontology/thumbnail> ?v_5 . } 
  OPTIONAL { ?id <http://www.w3.org/2000/01/rdf-schema#comment> ?v_6 . } 
  OPTIONAL { ?id <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?v_8 . } 
} 
LIMIT 12 
&format=application/rdf+xml

If I change the contained \. to \\. it will not error.

If I remove the <b></b> it will not error as well.

Kind Regards
Johannes

-- 
Johannes Goslar

dkd Internet Service GmbH 
development // kommunikation // design 
Kaiserstraße 73 
60329 Frankfurt am Main 

Kontakt: 
- email: johannes.gos...@dkd.de 
- fon: +49 69 2475218-0 
- fax: +49 69 2475218-99
- web: http://www.dkd.de
- social media: http://social.dkd.de

Aktuelle Projekte:
- http://j.mp/SehBiS-App – iPhone-App Sehbehinderungssimulator
- http://www.ellen-wille.de - Launch Website (TYPO3)
- http://www.vgf-ffm.de - Relaunch Website (TYPO3)

Geschäftsführer: O. Dobberkau, S. Schaffstein, G. Wegenast, C. Zabanski 
Registergericht: Amtsgericht Frankfurt am Main 
Registernummer: HRB 45590



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to