Hi Andy,

thanks for this information. 
Checking https://www.w3.org/TR/rdf11-concepts/#section-XMLLiteral in the 
meantime, I also realized that the value has to be in canonical form.
Consequently, after changing the value like follows solved the problem. 
<ref.legislation.national>\n        <national-judgement>
</national-judgement>\n      </ref.legislation.national>

Thanks again,
Patrick


On Thursday, April 27, 2017 at 1:31:48 PM UTC+2, Andy Seaborne wrote:
>
>
> Hi Patrick,
>
> The rules for valid XML Literals include a requirement that the XML is 
> "exclusive 
> canonical XML" <http://www.w3.org/TR/xml-exc-c14n/>, not just valid and 
> well-formed XML (then comparing valid XML literals "is" comparing their 
> lexical forms).
>
> Canonicalization includes requiring <x></x> form not <x/>.
>
>     Andy
>
> On Thursday, 27 April 2017 11:16:52 UTC+1, Patrick Gratz wrote:
>>
>> I am currently testing some shapes in order to validate the datatype for 
>> certain properties:
>> However, there seems to be a problem with the validation for XMLLiteral 
>> values.
>> More concretely, if I validate the following data graph:
>>
>> <
>> http://publications.europa.eu/resource/cellar/2b4291bb-df74-11e3-8cd4-01aa75ed71a1
>> >
>>         a           <
>> http://publications.europa.eu/ontology/cdm#resource_legal> , <
>> http://publications.europa.eu/ontology/cdm#case-law_national> , <
>> http://publications.europa.eu/ontology/cdm#work> , <
>> http://publications.europa.eu/ontology/cdm#case-law> ;
>>         <
>> http://publications.europa.eu/ontology/cdm#act_reference_european>
>>                 "" ;
>>         <
>> http://publications.europa.eu/ontology/cdm#act_reference_national>
>>                 "<ref.legislation.national>\n        <national-judgement 
>> />\n      </ref.legislation.national>"^^rdf:XMLLiteral .
>>
>> against this shape:
>>
>> validation:AllProperties a rdfs:Class , sh:NodeShape ;
>> sh:property [ 
>>                     sh:datatype  rdf:XMLLiteral ;
>>                     sh:path     
>>  cdm:case-law_national_reference_publication-conclusion
>>                   ] .
>>
>>
>> The validation result contains a violation complaining that the value 
>> does not have datatype rdf:XMLLiteral:
>>
>>  shacl:result    [ a                     shacl:ValidationResult ;
>>                     shacl:focusNode       <
>> http://publications.europa.eu/resource/cellar/2b4291bb-df74-11e3-8cd4-01aa75ed71a1>
>>  
>> ;
>>                     shacl:resultMessage   "Value does not have datatype 
>> rdf:XMLLiteral" ;
>>                     shacl:resultPath      <
>> http://publications.europa.eu/ontology/cdm#case-law_national_act_reference_national>
>>  
>> ;
>>                     shacl:resultSeverity  shacl:Violation ;
>>                     shacl:sourceConstraintComponent
>>                             shacl:DatatypeConstraintComponent ;
>>                     shacl:sourceShape     []  ;
>>                     shacl:value           "<ref.legislation.national>\n   
>>      <national-judgement />\n     
>>  </ref.legislation.national>"^^rdf:XMLLiteral
>>                   ] ;
>>
>> If, I remove the new line characters in the XMLLiteral value everything 
>> is fine. However, if I am not mistaken the given XML literal is actually 
>> also well-formed and should therefore not cause a validation issue?
>>
>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to