locked
Image to conceptual help

    Question

  •  

    Hi,

     

    Is there way we can insert image to the conceptual help. i tried using image tag which is part of the MAML but, image is not getting displayed.

     

    Also in conceptual.config file has target set to ArtSharedContent.loc.xml, which is not part of the sample. can anybody provide me the content of the file.

     

    Thanks,

    Naveen

    Thursday, January 03, 2008 8:12 AM

Answers

  • Hi Naveen,

     

    <image xlink:href="{id}" /> elements appear to be transformed into <artLink target="{id}" /> elements by the utilities_dduexml.xsl transformation.  Then it appears to be the responsibility of the ResolveArtLinksComponent to convert <artLink/> elements to HTML <img/> elements.

     

    Using Reflector I was able to deduce the basic schema of the ArtSharedContent.loc.xml file, which is apparently required to map art IDs to files.  Here's an example (although I haven't tested it myself yet).

     

    With the default ResolveArtLinksComponent configuration (a single target):

     

    <!-- resolve art links -->
    <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
      <targets input="%DXROOT%\Data\ArtStore" output=".\Output\media" link="../media" map="%DXROOT%\Data\ArtSharedContent.loc.xml" />
    </component>

     

    the following example map file: 

     

    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <item id="unique-id">  <!-- case insensitive -->
        <image file="path\image.jpg">  <!-- relative from input path specified in one or more art link targets -->
          <altText>Alternate text for the image.</altText>  <!-- optional -->
        </image>
      </item>
    </root>

     

    forms the following paths for image.jpg:

    • Input = %DXROOT%\Data\ArtStore\path\image.jpg
    • Output = .\Output\media\image.jpg
    • Href = ../media/image.jpg

    To reference the image in conceptual documentation you would use:

     

    <image xlink:href="unique-id" />

     

    and the transformation will convert it to:

     

    <artLink target="unique-id" />

     

    When BuildAssembler is executed, the ResolveArtLinksComponent build component will copy the image from the "Input" path to the "Output" path.  Then it will convert the XML to the following HTML, using the Href from above:

     

    <img alt="Alternate text for the image." src="../media/image.jpg" />

     

    I still have to try this out myself.  If you have any luck with it please let me know Smile

     

    - Dave

    Thursday, January 03, 2008 9:41 AM

All replies

  • You will need the ArtSharedConcent* stuff. The format is not yet published but I have

    created one that you can use, download and see how it was done in the article

     

    http://www.codeproject.com/KB/winhelp/SandcastleConceptual.aspx

     

    If you still have any problem, let me know.

     

    Best regards,

    Paul.

     

    Thursday, January 03, 2008 9:11 AM
  • Hi Naveen,

     

    <image xlink:href="{id}" /> elements appear to be transformed into <artLink target="{id}" /> elements by the utilities_dduexml.xsl transformation.  Then it appears to be the responsibility of the ResolveArtLinksComponent to convert <artLink/> elements to HTML <img/> elements.

     

    Using Reflector I was able to deduce the basic schema of the ArtSharedContent.loc.xml file, which is apparently required to map art IDs to files.  Here's an example (although I haven't tested it myself yet).

     

    With the default ResolveArtLinksComponent configuration (a single target):

     

    <!-- resolve art links -->
    <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll">
      <targets input="%DXROOT%\Data\ArtStore" output=".\Output\media" link="../media" map="%DXROOT%\Data\ArtSharedContent.loc.xml" />
    </component>

     

    the following example map file: 

     

    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <item id="unique-id">  <!-- case insensitive -->
        <image file="path\image.jpg">  <!-- relative from input path specified in one or more art link targets -->
          <altText>Alternate text for the image.</altText>  <!-- optional -->
        </image>
      </item>
    </root>

     

    forms the following paths for image.jpg:

    • Input = %DXROOT%\Data\ArtStore\path\image.jpg
    • Output = .\Output\media\image.jpg
    • Href = ../media/image.jpg

    To reference the image in conceptual documentation you would use:

     

    <image xlink:href="unique-id" />

     

    and the transformation will convert it to:

     

    <artLink target="unique-id" />

     

    When BuildAssembler is executed, the ResolveArtLinksComponent build component will copy the image from the "Input" path to the "Output" path.  Then it will convert the XML to the following HTML, using the Href from above:

     

    <img alt="Alternate text for the image." src="../media/image.jpg" />

     

    I still have to try this out myself.  If you have any luck with it please let me know Smile

     

    - Dave

    Thursday, January 03, 2008 9:41 AM
  •  

    Thanks Dave,

     

    I've tried based on your step by step approach it worked fine. for example purpose i took paul sample code which explain how exactly conceptual xml files are created.

     

    Thanks,

    Naveen

    Thursday, January 03, 2008 8:30 PM