on 12-22-2006 12:59 PM
I have a following XML which I have got after doing some XSLT transformations.
The problem is that in XML Spy the Output is perfect however when the same is done in XI I get the following problem.
Could you kindly help me out in correcting this issue.
<b>Source Message :</b>
<?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage>
<EnvelopeVersion>2.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Transformation>XML</Transformation>
</MessageDetails>
</Header>
<Body>
<IRenvelope>
<IRheader>
<TestMessage>1</TestMessage>
<Keys>
<Key Type="TaxOfficeNumber">123</Key>
</Keys>
<DefaultCurrency>GBP</DefaultCurrency>
<Sender>Company</Sender>
</IRheader>
</IRenvelope>
</Body>
</GovTalkMessage>
<b>Target Message:
<u>(IRenvelope namespace assigned to http://www.govtalk.gov.uk/taxation/MOV )</b></u>
<?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage>
<EnvelopeVersion>2.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Transformation>XML</Transformation>
</MessageDetails>
</Header>
<Body>
<IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/MOV>
<IRheader>
<TestMessage>1</TestMessage>
<Keys>
<Key Type="TaxOfficeNumber">123</Key>
</Keys>
<DefaultCurrency>GBP</DefaultCurrency>
<Sender>Company</Sender>
</IRheader>
</IRenvelope>
</Body>
</GovTalkMessage>
<b>XSLT Used</b>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="//IRenvelope">
<xsl:element name="IRenvelope" namespace="http://www.govtalk.gov.uk/taxation/MOV">
<xsl:copy select="."/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
<b>This works perfectly fine in the XML Spy however when use the same XSL file in XI the out put is
IRheader now belongs to a different namespace xmlns=" , which leads to rejection of the File by the webservice.</b>
<b>OUTPUT XML IN XI</b>
<?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage>
<EnvelopeVersion>2.0</EnvelopeVersion>
<Header>
<MessageDetails>
<Transformation>XML</Transformation>
</MessageDetails>
</Header>
<Body>
<IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/MOV>
<IRheader xmlns=">
<TestMessage>1</TestMessage>
<Keys>
<Key Type="TaxOfficeNumber">123</Key>
</Keys>
<DefaultCurrency>GBP</DefaultCurrency>
<Sender>Company</Sender>
</IRheader>
</IRenvelope>
</Body>
</GovTalkMessage>
Best Regards,
Chandan
Hi Chandan,
This seems to be a new ... feature.
You should open a ticket for this.
Which SP do you use?
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
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.