110 likes | 216 Views
Topic Maps - Compact Syntax (CTM) ISO/IEC 13250-6 Review of the current draft Oslo, April 2008. Agenda. Changes since Leipzig and Kyoto (2007) Overview about the current draft Open Issues Next Actions. Changes since Leipzig / Kyoto. Syntax for multiline comments
E N D
Topic Maps - Compact Syntax (CTM) ISO/IEC 13250-6 Review of the current draft Oslo, April 2008
Agenda • Changes since Leipzig and Kyoto (2007) • Overview about the current draft • Open Issues • Next Actions
Changes since Leipzig / Kyoto • Syntax for multiline comments • Support for item identifiers on topics • "isa" and "ako" are keywords (were templates previously) • Occurrence values cannot be declared as QName • Possibility to delimit topics via whitespaces was removed • CTM has become less whitespace dependent • Include directive changed • Less important: • Version directive was renamed • Mergemap directive was changed (Notation is a string now; previously an IRI) -> Another whitespace issue solved
Multiline comments • Syntax: #(comment here)# • Syntax is aligned to single line comments which are introduced via a hash sign: # • Multiline comments cannot be nested (should they?) • YES, they should be nested! • Possible problem: #(this is not a singleline comment
Item Identifiers • TMQL requires item identifiers for topics • Item identifiers are not meant to be authored by humans (we cannot avoid it, though) • Syntax: • ' IRI • ' QName • Result: Default prefix removed • john ^ http://.... ^ http:// IID: ^ as prefix for item identifier, no ' • Example John ' http://example.org/tm.ctm#john . Subject locator: = http:/... = http://... Subject Identifier: http://.. Reifier: ~ IRI (subject locator, subject identifier, iid) or QName
Example %prefix http://psi.topicmaps.org/tmcl/ def my-template($a, $b) $a isa constraint namecount: $b end my-template(a-topic, 2) http://psi.topicmaps.org/tmcl/a-topic
Topic delimiter • Topics MUST be delimited by a dot • The possibility to delimit topics via whitespaces (empty lines) seemed to cause problems / confusion • Caution: The "." is a valid character within identifiers. At least one whitespace character is needed to let the CTM processor detect the delimiter. Seems to be no serious problem, several RDF syntaxes have the same issue • Example: john . paul . ringo . george . Result: Identifiers cannot end with a dot, in case it is necessary, use an IRI (<>) neil-young. # Failure! The "." belongs to the identifier! (no failure anymore)
Include directive • Proposal from Kyoto: Include directive causes the referenced CTM document to be added to the current byte stream (equivalent of concatenation) • The Kyoto proposal causes several problems (i.e. multiple interpretations of one and the same topic map) • Proposal: The include directive does not concatenate files, but stays as it is and imports prefix declarations (but not the default prefix) and the templates • If the other file (B) defines a default prefix, the imported templates use that prefix rather than the default prefix of file (A) • Result: Prefixes are not imported!! • Example? Next page.
Include directive File A File B %prefix iri-A %include </file-b.ctm> john member-of(the-beatles). %prefix iri-B def member-of($member, $group) is-member(member: $member, group: $group) end Result: iri-B/is-member(iri-B/member : iri-A/john, iri-B/group: iri-A/the-beatles)
CTM Issues • Non-SVO problems?!? Result: Semicolon is used to delimit statements • Not required but legal at the end of a topic block • Forbid semicolon at the end of the IRI (use <> for the rare case where an IRI ends with ";") • Good algorithm to resolve wildcards and named wildcards (to make CTM CXTM compatible) (Result: Order of wildcards, sequence number, maybe use the name of a named wildcard as part of the item identifier) • TMQL has to provide the semantics for "undef" (Result: CTM does not need "undef") • Should it be possible to embed a topic declaration everywhere, where a topic reference is needed? member-of(group: [the-beatles – "The Beatles"], member: john) the-beatles homepage: .... . Result: [ ] is allowed in contexts where we refer to a topic, the topic identity is optional; We do not allow it at the top level; Nested topics can be nested again (i,e, as reifier of an occ). • List of values needed? eric website: <http://www.website-a.com>; <http://www.website-b.com/>. Result: NO NEED! Result: Two occurrences of type "website"
CTM Issues • Use "xsd" and a correct namespace .... –datatypes • Check it!