Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fernando Ayres Lysko 1 post 71 karma points
    Jun 07, 2021 @ 20:35
    Fernando Ayres Lysko
    0

    Get Img href attibute from a value in XML with XSLT

    Hi,

    I need some help to code a small piece of code: I want to use a XML exported form Google sheet as below and i am trying to upload it to Adobe Indesign, but the software doesn´t understand the address source of the image inside the Imagem element. I would like to use XSLT to use this value as href attribute, as below

    <data>
      <PetShop_1>
        <Item>PetShop_1</Item>
        <Cod_RMS>424919</Cod_RMS>
        <Descricao_Produto>RACAO NHOCK CLASSIC 8KG</Descricao_Produto>
        <Imagem>file:///G:/Drives%20compartilhados/Marketing/DESIGN/Cria%c3%a7%c3%b5es%202021/Tabloides/Boxes%20e%20tags/Pedro%20Jordan/vistas/6490226.jpg</Imagem>
      </PetShop_1>
    </data>
    

    And I want to group elements/tags inside a father element and get the value of the Imagem element above and put it inside the href attribute in the final XML using a XSLT file.

    And the final XML should be as below:

    <data>
        <PetShop_1>
            <Sistema>
                <Item>PetShop_1</Item>
                    <Cod_RMS>424919</Cod_RMS>
                    <Descricao_Produto>RACAO NHOCK CLASSIC 8KG</Descricao_Produto>
            </Sistema>
            <Imagem href="file:///G:/Drives%20compartilhados/Marketing/DESIGN/Cria%c3%a7%c3%b5es%202021/Tabloides/Boxes%20e%20tags/Pedro%20Jordan/vistas/6490226.jpg"></Imagem>
        </PetShop_1>
    </data>
    

    Someone could hekp me?

Please Sign in or register to post replies

Write your reply to:

Draft