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

Oxygen XML Editor Support support at oxygenxml.com
Tue Sep 17 02:37:59 CDT 2013


Hi Eliot,

Right now the DITA Map Export facility just copies resources and creates 
equivalent folder structures considering that the references are already 
relative, which in the case of CMS's might not be a correct assumption.

So between these two:

> - 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"?

We should probably have also implemented the first approach, forcing the 
references to be made relative. I added an issue for this, we'll see 
when we have time to approach it.
By the way, some CMSs also have features to export DITA content, does 
RSuite have one and if so, does it export the content by rewriting the 
references?

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 9/16/2013 11:48 PM, Eliot Kimber wrote:
> 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.
>
>


More information about the oXygen-user mailing list