[oXygen-user] Should Export DITA Map Rewrite Pointers?

Eliot Kimber ekimber at rsicms.com
Mon Sep 16 15:48:09 CDT 2013


I have a DITA map that is stored in the RSuite CMS, where all the URLs are
RSuite REST URLs of the form:

<map>
 ...
<topicref  
href="/rsuite/rest/v2/content/binary/alias/sales-demo-forward-01.dita"/>

</map>

This URL will resolve relative to the RSuite server URL, meaning that if the
URL is resolved relative to the URL of the map opened from an absolute
RSuite REST URL that it will always work (RSuite does not provide URLs that
are hierarchical like a file system because there is no single or necessary
containment relationship among objects in RSuite).

Because the URLs just work, I can, for example, open a DITA map using a URL
like:

http://localhost:8080/rsuite/rest/v2/content/element/alias/sample-pubmap-no-
keys.ditamap

And Oxygen is happy with it--I can perform all read-only operations against
the map, including export DITA map.

However, when I tried that, just to see what I would get, I noticed that the
structure of the files as packaged reflected the relative paths from the map
to the topics, e.g. "element/alias/sales-demo-forward-01.dita" for the map
and "binary/alias/sales-demo-forward-01.dita" for the topics.

However, the URLs in the result were not rewritten to reflect the directory
structure, so the map as exported doesn't work because it still uses the
absolute paths.

Obviously this is a somewhat artificial case, but it does demonstrate that
the map exporter is making an assumption about the data that is not
warranted in this case, namely that URLs are relative.

My question:

- Should the map exporter handle this case and rewrite pointers to reflect
the location of the targets in the export location?

- Should the exporter detect the use of absolute resource parts and make the
output structure reflect those paths? That is, should the exported structure
have started with /rsuite rather than "sample-pubmap-no-keys"?

Cheers,

E. 


-- 
Eliot Kimber
Senior Solutions Architect | RSI Content Solutions
Work: 512.554.9368
<http://www.youtube.com/watch?v=Sj4qT8sH42s>
Web:  http://www.rsicms.com
Book: DITA For Practitioners, from XML Press,
http://xmlpress.net/publications/dita/practitioners-1/



More information about the oXygen-user mailing list