dita4publishers / org.dita4publishers.epub

DITA-to-EPUB transformation type
Apache License 2.0
8 stars 4 forks source link

Topic ref with @processing-role = 'resource-only' are processed #35

Open blefort-uo opened 9 years ago

blefort-uo commented 9 years ago

Is it normal behaviour for pub ?

Should I replace the xpath expression for the template mode="generate-content"?

match="*[df:class(., 'map/topicref')]">

by

match="*[df:class(., 'map/topicref')][not(@processing-role = 'resource-only')]
drmacro commented 9 years ago

It depends on what you're doing with the topicref.

processing-role of "resource-only" means "this resource is a dependency but is not directly processed", so in most cases you would want to ignore that topicref.

Likewise, a scope of "peer" or "external" should be ignored in most cases (in a pre-processed map "peer" would normally only appear on maprefs to peer maps, something that is not defined as meaningful in DITA 1.2 but is in DITA 1.3).

blefort-uo commented 9 years ago

So would it be better to have this in a customization plugin rather than the epub transform ?

I really like the result, by the way. Our team was impressed too by your work !

I used them in the HTML5 plugin to render content in the background, but not linked them to the content. I render them contextually by javascript .

drmacro commented 9 years ago

Not sure which part of the code you're concerned with, but the base EPUB code (and all the map-driven transforms) should be consistent in how they handle topicrefs.

I may not have scrubbed the EPUB code sufficiently in my recent updates for peer and external topicref support.

blefort-uo commented 9 years ago

So I think, there is one inconsistency, because all topics with @processing-role = 'resource-only' are rendered in the epub.

I can send you an example if you wish.

drmacro commented 9 years ago

There be an SourceForge issue for that. Definitely needs to be fixed if true.