Hi Richard, I had xmlns:gml="http://www.opengis.net/gml" as one of the namespaces defined in the D2RQ mapping. And this is also reflected in the resulting RDF, i.e. it has gml as one of the namespaces defined at the top.
I think the question is, how do I get D2RQ to generate the net:nodeGeometry property with the "rdf:parseType" attribute set to "Literal" instead of the "rdf:dataType" attribute set to "rdfs:XMLLiteral". Any thoughts? Best regards, Arif -----Original Message----- From: Richard Cyganiak [mailto:[email protected]] Sent: 26 November 2010 17:32 To: Shaon, Arif (STFC,RAL,ESC) Cc: [email protected] Subject: Re: [d2rq-dev] XML Content within an RDF Graph Hi Arif, I'm not 100% sure, but it *might* be because the XML fragment is not valid XML. That's because the gml namespace is not declared inside the XML fragment. XML fragments in RDF always must be self-contained and include namespace declarations for all XML namespaces. Whether that's a good design is a separate question, but anyway it's what the RDF spec demands. You might want to modify the ST_AsGML function to include something like xmlns:gml="http://www.opengis.net/gml" to the <gml:Point> tag. If you can't modify the function, then modify the d2rq:sqlExpression to add some string replacement function that inserts the xmlns. As I said, I'm not 100% sure that this will fix the problem, but please try this first and if it doesn't help, then I will dig deeper. Hope that helps, Richard On 26 Nov 2010, at 13:29, <[email protected]> <[email protected]> wrote: > Hi List, > > I am trying to generate the following RDF property with some XML > content as its value (in accordance with the relevant RDF spec at: > http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-XML-literals) > : > > <net:nodeGeometry rdf:parseType="Literal"><gml:Point><gml:pos > srsDimension="2">530980 179740</gml:pos></gml:Point></ > net:nodeGeometry> > > And I have the following D2RQ PropertyBridge defined: > > map:trans_pt_point_the_geom a d2rq:PropertyBridge; > d2rq:belongsToClassMap map:trans_pt_point; > d2rq:property net:nodeGeometry; > d2rq:propertyDefinitionLabel "trans_pt_point the_geom"; > d2rq:sqlExpression "ST_AsGML(3, trans_pt_point.the_geom, 20, > 1)"; > d2rq:datatype rdf:XMLLiteral; > . > > But what I get from D2RQ is as follows: > > <net:nodeGeometry > rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral > "><gml:Point><gml:pos srsDimension="2">147780 30660</ > gml:pos></gml:Point></net:nodeGeometry> > > As it is shown above, the XML tags are escaped. > > Could someone please advise what I am doing wrong? > > Regards > Arif > > > ****************************************************************** > Dr Arif Shaon > > Software Research Scientist, > Scientific Applications Group, > E-Science Centre, Science and Technology Facilities Council, > Rutherford Appleton Laboratory Chilton, Didcot, OXON, OX11 0QX, UK > tel: +44 1235 448178 > [email protected]<mailto:[email protected]> > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with > the > Intel(R) Software Partner Program. Five $500 cash prizes are up for > grabs. > http://p.sf.net/sfu/intelisp-dev2dev_______________________________________________ > d2rq-map-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel -- Scanned by iCritical. ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ d2rq-map-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel
