Skip to content

Struggling to parse GML in RDF+XML files #2667

Answered by afs
dodinh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dodinh,

Q1. rdf:parseType="Literal"

RDF/XML doesn't have a way to say "parse as structured XML and set the datatype to this URI".
You may also notice the lexical form of the RDF literal produced includes a xmlns:gml= declaration.
This is part of RDF/XML parsing to produce a valid rdf:XMLLiteral. To be valid, it must have must be a standalone XML fragement and have namespace declarations.

Q2. rdf:datatype="http://www.opengis.net/ont/geosparql#gmlLiteral"

The body of the property which has rdf:datatype is the lexical form for the literal. It has to be a simple string with any XML characters escaped e.g. <. Structured XML is not accepted.

Q3. rdf:parseType= rdf:datatype=

That's a bug,…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dodinh
Comment options

Answer selected by dodinh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants