cancel
Showing results for 
Search instead for 
Did you mean: 

Where to keep my xsl file in a MII application without web part?

Former Member
0 Kudos

I am using MII to get data from different sources and put it together in one XML. I have started to build my xsl transformation file and now I have a doubt.

My xsl file is used only by my MII application. My MII application do not have web part (just query commands and transactions). Where do I have to keep my xsl file? Is there a way to put my xsl content in some action/transaction variable?

Nuno Cunha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you All for your comments. It help me a lot.

Nuno Cunha

Former Member
0 Kudos

I think you can store it as an xml type transaction property and assign it directly in the XSL transformation action.

Former Member
0 Kudos

Hi Christian,

I created a local variable and assign it to InputXLS parameter.

When I log the transformation (Output) all I have is: [INFO ]: <?xml version="1.0" encoding="UTF-8"?>, which is the first part of my xsl variable (shown below). I have tried two XSL definitions (1 and 2). Both gave me the same result.

The first XSL do nothing, so I was specting receive the values of all nodes. The second XSL is simple. I have made an union of two queries in an earlier sequence. The first one, "/Rowsets/Rowset[1]", I will put in the "ListaMovimento" node. The second one, "/Rowsets/Rowset[2]", I will put in the "ListaMensagem" node.

Can you see what I did wrong here?

Thank you very much,

Nuno Cunha

XSL 1:

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"></xsl:stylesheet>

XSL 2:

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<ListaMovimentosEMensagens>

<xsl:template match="/Rowsets/Rowset[1]">

<ListaMovimento>

<xsl:for-each select="Row">

<Movimento>

<Solicitacao><xsl:value-of select="SOLICITACAO"/></Solicitacao>

<Ordem><xsl:value-of select="ORDEM"/></Ordem>

<Local_Origem><xsl:value-of select="LOCAL_ORIGEM_RFID"/></Local_Origem>

<Local_Destino><xsl:value-of select="LOCAL_DESTINO_RFID"/></Local_Destino>

<Carreta><xsl:value-of select="CARRETA_RFID"/></Carreta>

</Movimento>

</xsl:for-each>

</ListaMovimento>

</xsl:template>

<xsl:template match="/Rowsets/Rowset[2]">

<ListaMensagem>

<xsl:for-each select="Row">

<Mensagem><xsl:value-of select="MENSAGEM"/></Mensagem>

</xsl:for-each>

</ListaMensagem>

</xsl:template>

</ListaMovimentosEMensagens>

</xsl:stylesheet>

Former Member
0 Kudos

Look at your TextOutput instead of your Output. Also It doesnt like where that <ListaMovimentosEMensagens> node is for some reason.

Former Member
0 Kudos

Try the following instead and check the result -

......

<xsl:template match="/">

<ListaMovimento>

<xsl:for-each select="Rowsets/Rowset[1]/Row">

......

<xsl:template match="/">

<ListaMovimento>

<xsl:for-each select="Rowsets/Rowset[2]/Row">

......

Let us know what you see.

Chanti.

Former Member
0 Kudos

Hi Christian,

I did now logging the TextOutput parameter and it has the right XML string! At the time to link to an external parameter of my transaction could I link Output parameter or I have to link just TextOutput?

Nuno Cunha

Former Member
0 Kudos

Hi CKxMII,

It doesn't work. At the end I get only "ListaMensagem" node!

If I let only the first part I get "ListaMovimento" node, but with both only the second node appears in TextOutput.

Nuno Cunha

Former Member
0 Kudos

Hi Christian,

About <ListaMovimentosEMensagens>, it was my mistake. The right XSL would be as shown below.

Thanky you very much,

Nuno Cunha

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/">

<ListaMovimentosEMensagens>

<xsl:apply-templates/>

</ListaMovimentosEMensagens>

</xsl:template>

<xsl:template match="Rowsets/Rowset[1]">

<ListaMovimento>

<xsl:for-each select="Row">

<Movimento>

<Solicitacao><xsl:value-of select="SOLICITACAO"/></Solicitacao>

<Ordem><xsl:value-of select="ORDEM"/></Ordem>

<Local_Origem><xsl:value-of select="LOCAL_ORIGEM_RFID"/></Local_Origem>

<Local_Destino><xsl:value-of select="LOCAL_DESTINO_RFID"/></Local_Destino>

<Carreta><xsl:value-of select="CARRETA_RFID"/></Carreta>

</Movimento>

</xsl:for-each>

</ListaMovimento>

</xsl:template>

<xsl:template match="Rowsets/Rowset[2]">

<ListaMensagem>

<xsl:for-each select="Row">

<Mensagem><xsl:value-of select="MENSAGEM"/></Mensagem>

</xsl:for-each>

</ListaMensagem>

</xsl:template>

</xsl:stylesheet>