Closed CrocoDillon closed 2 years ago
Hi 👋
C1 strings are an original syntax, so they can be a bit confusing at first.
For literals, the language or datatype comes first, then the contents of the literal. So for example, @en"Hello world
, or ^xsd:integer"10
. So in your example, try this:
({
'gwsw:hasAspect': {
a: 'gwsw:Punt',
'gwsw:hasValue':
'^geo:gmlLiteral"<gml:Point xmlns:gml="http://www.opengis.net/gml"><gml:pos>150000 400000 -5</gml:pos>
</gml:Point>',
})
Notice how the "
quotes inside the literal's contents don't need to be escaped :)
How did I miss this 🙈 This works (obviously), thanks a lot for your answer! 😄
Hello, I'm pretty much a newb to any of this so sorry for this question (I did my best to search for the answer though). I need to implement an export to
.ttl
format. However when I try to include a quoted literal with datatype the output is not what I expect. Am I doing something wrong?Input:
Red is actual output, green is expected output (closing quote is escaped and new closing quote is added):
It doesn't seem to matter whether or not the quoted literal contains double quotes.