on 05-09-2010 6:20 AM
Hello Experts,
I need to import an external stylesheet (on the web) into my xml file.
I wrote the below xslt code. Although it executes successfully, i do not see the external stylesheet being added to the XML.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:import href="http://www.moda-ml.net/moda-ml/repository/xsl/v2004-1/en/TEXDesAdviseEN.xsl" />
<xsl:apply-imports />
<xsl:copy-of select="/" />
</xsl:template>
</xsl:stylesheet>
Do let me know whether there is any error in the code or whether I need to follow some additional steps/processes.
Thanks in advance.
Is this what you are looking for:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanyou very much Raj and Stefen.
Raj: I can do what you have suggested but the problem is the xsl on the web again calls another xsl and so on. So I would need to do it multiple times, which I wanted to avoid.
Stefen: It worked. It was exactly what I was looking for. Thankyou.
I have an additional requirement in the xsl transformation now. If you could please help on it too.
I need to change the name of the node ns0:TEXDesAdvice to ml:TEXDesAdvise and add attributes. Below are my input and expected output.
input:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:TEXDesAdvise>
<data segments>
</data segments>
</ns0:TEXDesAdvise>
output:
<?xml version="1.0" encoding="UTF-8"?>
<ml:TEXDesAdvise TAtype="STD" msgfunction="OR"
<data segments>
</data segments>
</ml:TEXDesAdvise>
Thanks in Advance.
Hi,
Try to downlaod the XSLT from the website and add this to your imported archieve folder,then execute it.
it will work,i am not sure that calling extenal reference XSL in mapping will work , even i had done like that only in my requirement.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.