Conceptual topic with medialink does not show image

Topics: User Forum
Jun 6, 2008 at 7:31 PM
Hi,

I'm using SHFB 1.7.0.0 and successfully created conceptual topics.

One bug (I think) regarding the mediaLink tag: it does not work if it is the only element inside a <content> tag.
Works fine if a put some text before or after the mediaLink or if a set a caption for the link.

Is this a bug of sandcastle, SHFB, SandCastleStyles ?

If this is not then how could I have an image, alone, in a content ?


For example:

<section address="whatever">
  <title>My title</title>
  <content>
    <mediaLink>
      <image xlink:href="SOME GUID NUMBER"/>
    </mediaLink>
  <content>
</section>

Coordinator
Jun 6, 2008 at 7:47 PM
Edited Jun 6, 2008 at 7:49 PM
I believe the transformations only render certain items if they actually contain text (i.e. normalize-space() returns a non-empty string) otherwise they are ignored.  That would explain why adding a caption causes it to appear as the inner text of the caption satisfies the check.  Open a work item in the Sandcastle Styles project and we'll look into it.  It should be fairly easy to fix such as including a check for mediaLink elements.

Eric
Jun 6, 2008 at 7:49 PM
Edited Jun 6, 2008 at 7:53 PM
>> If this is not then how could I have an image, alone, in a content ?
You can give the image a caption, and this should not be a problem - sort of a description.
You are simply tricking the a whole section to display only a collapsible image!

Best regards,
Paul.
Jun 6, 2008 at 8:00 PM


EWoodruff wrote:
I believe the transformations only render certain items if they actually contain text (i.e. normalize-space() returns a non-empty string) otherwise they are ignored.  That would explain why adding a caption causes it to appear as the inner text of the caption satisfies the check.  Open a work item in the Sandcastle Styles project and we'll look into it.  It should be fairly easy to fix such as including a check for mediaLink elements.

Eric


Done!
Jun 6, 2008 at 8:07 PM


SelormeyPaul wrote:
>> If this is not then how could I have an image, alone, in a content ?
You can give the image a caption, and this should not be a problem - sort of a description.
You are simply tricking the a whole section to display only a collapsible image!

Best regards,
Paul.

Yeah, I could give a caption to the image but the section text is enough for my purpose, otherwise it would be a duplicate text.

It does not seem the section like to be tricked... ;)

Have a nice weekend!