[topicmapmail] YALTM ("YALTM Ain't LTM")
Kal Ahmed
kal@techquila.com
Mon, 17 Oct 2005 08:40:56 +0100
Hi Rich,
One quick question first - why YAML? Is it because there are parsers /
serializers available for it already? Or is there some other compelling
reason for not simply using LTM? Unless I've missed something, it seems that
YAML does not have any schema mechanism - there is no way to validate that
you haven't misspelt a tag for example, which to my mind would be a big
issue. Anyway, if YMAL works for you, that's great...and if it means I can
draw topic maps in OmniGraffle then that's greater than great ;-)
Now some comments on your data structure:
1) I recommend that you look at TMDM
(http://www.isotopicmaps.org/sam/sam-model/) to validate your YAML model.
You'll probably find it both easier and more accurate if you think of how
the YAML graph model maps to TMDM (and vice-versa), then work backwards from
the YAML graph to the YAML serialization.
2) Associations can have multiple roles. Unless you plan to only support a
subset of topic maps with just binary associations, you need to expand your
associations syntax, probably by allowing a sequence of role structures.
e.g.
Associations:
- type: format_for
- roles:
- role_type: format
role_player: yaltm
- role_type: standard
role_player: topic_maps
3) Topics are not scoped! Only topic characteristics are scoped and each
characteristic can have a different scope. That means you need your scope
structure on topic names, occurrences and associations.
4) If you read through TMDM, you will find some other changes from XTM 1.0
such as topic names can now be typed. I recommend that you include these in
your model to keep up with the changes we can expect over the coming months
from ISO.
Hope this helps!
Cheers,
Kal
> -----Original Message-----
> From: topicmapmail-admin@infoloom.com [mailto:topicmapmail-
> admin@infoloom.com] On Behalf Of Rich Morin
> Sent: 17 October 2005 02:33
> To: topicmapmail@infoloom.com
> Subject: [topicmapmail] YALTM ("YALTM Ain't LTM")
>
> I've put together a YAML (http://www.yaml.org) expansion of LTM, for
> use as a self-documenting way to encode Topic Maps. I'm very new at
> both LTM and Topic Maps, however, so I may well have missed a trick.
>
> So, please take a look at the following example and let me know what
> issues I haven't handled properly. It isn't really necessary to be
> a YAML expert to read the format; just understand that
>
> Associations:
> - type: format_for
> src_name: yaltm
>
> yields a compound data structure, such that (in Perl-speak):
>
> $r->{Associations}[0]{src_name} yields 'yaltm'
>
> That is:
>
> The reference $r points to a hash.
> The "Associations" element of this hash is an array.
> The "0" element of this array is a hash.
> The "src_name" element of this hash is a string.
> The value of the string is "yaltm".
>
> Once I have some confidence in YALTM, I plan to write some filters
> (e.g., to/from DOT, LTM, OmniGraffle).
>
> -r
>
>
> #####
>
> # example.yaltm - example YALTM file
> #
> # YALTM ("YALTM Ain't LTM") is a YAML (http://www.yaml.org) expansion of
> LTM
> # (Linear Topic Map Notation; http://www.ontopia.net/download/ltm.html).
> It
> # strives to be clear and self-documenting. It is easy to generate, edit,
> and
> # (thanks to YAML) parse and load as a data structure. Although more
> verbose
> # than LTM, it is simpler and (arguably) clearer than its XML equivalents.
> #
> # Written by Rich Morin, rdm@cfcl.com, 2005.
>
> Associations:
>
> # format_for(yaltm : format,
> # topic_maps : standard)
>
> - type: format_for
> src_name: yaltm
> src_type: format
> dst_name: topic_maps
> dst_type: standard
>
>
> Occurrences:
>
> # {yaltm,
> # specification,
> # "http://www.cfcl.com/topic_map/yaltm_spec.html"}
> # }
>
> - id: yaltm
> role_type: specification
> locator: "http://www.cfcl.com/topic_map/yaltm_spec.html"
>
>
> Topics: # All topics go
> here.
>
> # [yaltm : format standard # ID and types
> #
> # = "YALTM"; # base name
> # "LTM, YALTM Ain't" # sort name
> # "YALTM Ain't LTM" # display name
> #
> # / topic_maps # topic scope
> # ("YALTM" / acronym) # variant names
> # ("YILTM" / erroneous)
> #
> # @"http://www.cfcl.com/topic_map/yaltm" # subject
> indicator(s)
> # %"http://www.cfcl.com/topic_map/yaltm.html" # subject
> reference(s)
> # ]
>
>
> - id: "yaltm" # topic ID
>
> types: # topic type(s)
> - format
> - standard
>
> base_name: "YALTM" # base name
> disp_name: "YALTM Ain't LTM" # display name
> sort_name: "LTM, YALTM Ain't" # sort name
>
> subj_inds: # subject
> indicator(s)
> - "http://www.cfcl.com/topic_map/yaltm"
> subj_refs: # subject
> reference(s)
> - "http://www.cfcl.com/topic_map/yaltm.html"
>
> scope: topic_maps # topic scope
>
> variants: # variant name(s)
> acronym: "YALTM"
> erroneous: "YILTM"
>
> #####
>
> --
> email: rdm@cfcl.com; phone: +1 650-873-7841
> http://www.cfcl.com - Canta Forda Computer Laboratory
> http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
> _______________________________________________
> topicmapmail mailing list
> topicmapmail@infoloom.com
> http://www.infoloom.com/mailman/listinfo/topicmapmail
>