The Below is my input xml
<ServiceIncident xmlns="http://b2b.ibm.com/schema/IS_B2B_CDM/R2_2">
<RequesterID/>
<ProviderID>INC0011731</ProviderID>
<ProviderPriority>4</ProviderPriority>
<WorkflowStatus>NEW</WorkflowStatus>
<Transaction>
<Acknowledge>1</Acknowledge>
<StatusCode>0</StatusCode>
<Comment>String</Comment>
<TransactionName>Problem_Submittal</TransactionName>
<TransactionType>2</TransactionType>
<TransactionDateTime>2012-10-19T16:05:56Z</TransactionDateTime>
<TransactionNumber>2012-10-19T16:05:56Z:1ae9b6a79901fc40fa75c64e1cdcc3b4</TransactionNumber>
<TransactionRouting>MX::ITELLASNINCBRDG</TransactionRouting>
<DataSource>ServiceNow</DataSource>
<DataTarget>NASPGR72</DataTarget>
</Transaction>
My problem is only one or two fields i need to map in xslt other than that whatever is in the input i need in output.
Below is the code iam using in the xslt to copy input.
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
After that iam mapping one element which is not same in input and output by using the following x-path expression but iam not getting output.
<TransactionRouting>
<xsl:text>Maximo</xsl:text>
</TransactionRouting>
By using the above copy code iam able to copy whole input as output but if iam trying to do map one element in xsl by using x-path expression as shown above which is not same in input and output iam not able to do so please help me on this.
Your question is not very clear, but based on my understanding i have tried this
Hope! this would meet ur requirement :)
Your XML has a default namespace
xmlns="http://b2b.ibm.com/schema/IS_B2B_CDM/R2_2"
This means all nodes are under that namespace. You need to include this in your stylesheet in this case
xmlns:ibm="http://b2b.ibm.com/schema/IS_B2B_CDM/R2_2"
. After that you can refer to a node using a prefixibm:
.exclude-result-prefixes="ibm"
eliminates the prefix at the output.The following stylesheet is probably what you need