Skip to Content
author's profile photo Former Member
Former Member

how to handle duplicate nodes in xslt mapping


in my scenario that i have a source mapped to the canonical structure and from canonical to target.

source structure



canonical structure

<id> 0 to unbounded



the mapping from source to canonical

is like i have duplicated the canonical structure and then mapped

id -


type--- assigned a constant employee

id -


type--- assigned a constant National

i have used xslt mapping using stylus studio and mapping from source to canonical is not the problem

when i mapped the canonical to target there is a problem

the node id is visible once in the canonical when the structure is a source

but there is a dupicate node in the structure but not visible. how to procedue with the mapping for canonical to target

kindly help me

with regards

pradeep N

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Jun 14, 2007 at 09:44 AM

    Hi Pradeep,

    sorry, your task is difficult ot understand.

    Can you gibe me an XML example for your issue?

    - The source, which you want to map, and

    - the result, which you would like to have?



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Pradeep,

      this should work:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:ns0="">
      	<xsl:template match="*">
      				<xsl:value-of select="//ID[../Type='Employee']"/>
      				<xsl:value-of select="//ID[../Type='National']"/>