[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Improved Re: [tag] New Proof of Concept Representation in RDF
Modifying it yet again! This shows how getting RDF right isn't exactly straightforward, simple though RDF might seem, yet it is certainly possible, eventually, to write a proper test assertion with it, as below: * target (which, in the example, is shared between the two assertions) e.g. <rdf:Description rdf:about="http://example.org/#ubl1/Invoice.Details/"> ... * Test Assertion ID and Spec Ref e.g. <ta:Assertion><rdf:Description rdf:ID="ta-001" ta:SpecRef="001" ... (Specification reference needing a new namespace) * predicate ('predicate', in the RDF sense, split into property and value) e.g. <ta:Assertion> <rdf:Description ... my-ta1:SchemaValidity="http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsdrt/maindoc/UBL-Invoice-1.0.xsd"/> </ta:Assertion> where * Predicate property = my-ta1:SchemaValidity (defined as a Property in RDF) * Predicate value = RDF object = http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsdrt/maindoc/UBL-Invoice-1.0.xsd In this case, using prose instead would be along the lines of this: <rdf:Description rdf:about="http://example.org/#ubl1/Invoice.Details/"> <ta:Assertion> <rdf:Description rdf:ID="ta-001" ta:SpecRef="001">is valid against schema http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsdrt/maindoc/UBL-Invoice-1.0.xsd</rdf:Description> </ta:Assertion> </rdf:Description> The complete example is below and the graph and a zipped .rdf file are attached [Note: The OASIS mail archive adds some ';' characters which will need removing to get valid XML from example below] <?xml version="1.0"?> <rdf:RDF xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:my-ta1="http://example.org/#example1" xmlns:my-ta2="http://example.org/#example2" xmlns:ta="http://example.org/#ta-schema" xml:base="http://example.org/"> <rdfs:Property rdf:about="http://example.org/#example1SchemaValidity" rdfs:label="my-ta1:SchemaValidity" rdfs:comment="The subject is valid against the schema which is the object."/> <rdfs:Property rdf:about="http://example.org/#example2Contains" rdfs:label="my-ta2:Contains" rdfs:comment="The subject is a container which contains the object."/> <rdfs:Property rdf:about="http://example.org/#SpecRef" rdfs:label="ta:SpecRef" rdfs:comment="The object is a specification normative reference from which the subject is derived."/> <rdfs:Resource rdf:about="http://example.org/#Assertion" rdfs:label="ta:Assertion" rdfs:comment="The object is a test assertion of a normative statement about the subject."/> <rdf:Description rdf:about="http://example.org/#ubl1/Invoice.Details/"> <ta:Assertion> <rdf:Description rdf:ID="ta-001" ta:SpecRef="001" my-ta1:SchemaValidity="http://docs.oasis-open.org/ubl/cd-UBL-1.0/xsdrt/maindoc/UBL-Invoice-1.0.xsd"/> </ta:Assertion> <ta:Assertion> <rdf:Description rdf:ID="ta-002" ta:SpecRef="002" my-ta2:Contains="http://example.org/#ubl1/Invoice.IssueDate.Date/"/> </ta:Assertion> </rdf:Description> </rdf:RDF> -- Stephen Green Partner SystML, http://www.systml.co.uk Tel: +44 (0) 117 9541606 http://www.biblegateway.com/passage/?search=matthew+22:37 .. and voice
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]