Topic maps, trait for parsing and dumping xtm instances.
# this is not an end-user package # see the source in TM::Materialized::XTM how this can be used
This trait provides parsing and dumping functionality for \s-1XTM\s0 instances.
only a single <topicMap> is allowed in one instance, there is no support for multiple maps per document
only a single scope is allowed for (base)names, occurrences and associations.
In \s-1XTM\s0 1.1 you cannot host \s-1XML\s0 content in occurrences.
No reification support in 1.0 or 1.1.
This package does not make any use of item identifiers.
Relative URIs are \s-1NOT\s0 made absolute via the base \s-1URI\s0 where the map is loaded from. This may \s-1NOT\s0 be what a user ultimately wants. Also all \s-1URI\s0 canonicalization is skipped.
The \*(C`xlink:type\*(C' attribute is completely ignored.
<mergeMap> is handled in 1.0, 1.1, but any scoping topic is ignored. This is related to the above.
At this stage, you can only include other \s-1XTM\s0 instances with <mergeMap>, not AsTMa= or \s-1LTM\s0. This may be fixed in the future.
No variants are serialized or deserialized.
Reification of topic map item is \s-1NOT\s0 supported.
\*(C`isa\*(C' and \*(C`is-subclass-of\*(C' associations which are scoped (or reified) are not handled special yet.
Suppress trivia might also suppress homepage << occurrence assertions.
Relative URLs in \*(C`mergeMap\*(C' are not made absolute.
This method takes an \s-1XTM\s0 string and tries to parse it. It will raise an exception on parse error. The if a \*(C`version\*(C' attribute exists, then the value
This method serializes the map object into \s-1XTM\s0 notation and returns the resulting string. It will raise an exception if the object contains constructs that \s-1XTM\s0 cannot represent. The result is a standard Perl string, so you may need to force it into a particular encoding. The method understands a number of key/value pair parameters:
This option suppresses the output of topics without any characteristics. This option controls whether \s-1XTM\s0 1.0 or \s-1XTM\s0 2.0 (default) is generated.
\s-1TM\s0, TM::Serializable
Copyright 200[78] Alexander Zangerl, Robert Barta.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html