Http:// 1 Topic Maps - Compact Syntax (CTM) ISO/IEC 13250-6 Review of the current draft Oslo, April...
-
Upload
arlene-young -
Category
Documents
-
view
214 -
download
0
Transcript of Http:// 1 Topic Maps - Compact Syntax (CTM) ISO/IEC 13250-6 Review of the current draft Oslo, April...
http://www.isotopicmaps.org slide 1
Topic Maps - Compact Syntax (CTM)
ISO/IEC 13250-6
Review of the current draft
Oslo, April 2008
http://www.isotopicmaps.org slide 2
Agenda
• Changes since Leipzig and Kyoto (2007)
• Overview about the current draft
• Open Issues
• Next Actions
http://www.isotopicmaps.org slide 3
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
http://www.isotopicmaps.org slide 4
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
http://www.isotopicmaps.org slide 5
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
http://www.isotopicmaps.org slide 6
Example
%prefix http://psi.topicmaps.org/tmcl/
def my-template($a, $b) $a isa constraint namecount: $bend
my-template(a-topic, 2)
http://psi.topicmaps.org/tmcl/a-topic
http://www.isotopicmaps.org slide 7
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)
http://www.isotopicmaps.org slide 8
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.
http://www.isotopicmaps.org slide 9
Include directive
%prefix iri-A
%include </file-b.ctm>
john member-of(the-beatles).
File A
%prefix iri-B
def member-of($member, $group) is-member(member: $member, group: $group)end
File B
Result:
iri-B/is-member(iri-B/member : iri-A/john, iri-B/group: iri-A/the-beatles)
http://www.isotopicmaps.org slide 10
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-beatleshomepage: .... .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?ericwebsite: <http://www.website-a.com>; <http://www.website-b.com/>.Result: NO NEED!Result: Two occurrences of type "website"
http://www.isotopicmaps.org slide 11
CTM Issues
- Use "xsd" and a correct namespace .... –datatypes
• Check it!