How to preview locally-saved images in the XML Preview window of Studio?

Hi,

How can I do to see the images (that are saved in a folder of my Desktop) of my XML source file in the XML Preview window of Studio?

The English source XML file contains Facebook posts and local links to images. The XML source file has a stylesheet.xsl and I created a customized XML file type in Studio.

Thank you in advance for your help on this.

Best regards,

Carla

Parents
  • Hi ,

    Thanks for sending me the file and for posting your question in here. I'll send you an updated stylesheet that you can play with to get the size of the images correct. All I did was change your syntax calling the image and added a new template. I deleted this:

    <img><xsl:attribute name="href"><xsl:value-of select="Image"/></xsl:attribute></img>

    Then replaced it with this:

    <xsl:apply-templates select="Image" />

    And added this at the end:

    <xsl:template match="Image">
    <img src="{.}" />
    </xsl:template>

    This then worked. Now I'm no expert of the creation of stylesheets so I can't really explain a lot about this, I just recall doing a similar exercise that took me a while to figure out and this is the solution that worked for me. Hope it helps.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • Hi ,

    Thanks for sending me the file and for posting your question in here. I'll send you an updated stylesheet that you can play with to get the size of the images correct. All I did was change your syntax calling the image and added a new template. I deleted this:

    <img><xsl:attribute name="href"><xsl:value-of select="Image"/></xsl:attribute></img>

    Then replaced it with this:

    <xsl:apply-templates select="Image" />

    And added this at the end:

    <xsl:template match="Image">
    <img src="{.}" />
    </xsl:template>

    This then worked. Now I'm no expert of the creation of stylesheets so I can't really explain a lot about this, I just recall doing a similar exercise that took me a while to figure out and this is the solution that worked for me. Hope it helps.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children