on 01-11-2010 6:50 PM
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
Thank you All for your comments. It help me a lot.
Nuno Cunha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you can store it as an xml type transaction property and assign it directly in the XSL transformation action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
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>
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.