cancel
Showing results for 
Search instead for 
Did you mean: 

Customize the standard XSL Mapping code

Former Member
0 Kudos

Hi,

We have a requirement that we need to customize the standard interface (ABABusinessPartner). 6 additional fields are added to the standard structure, since it is standard interface the communication used between them is proxies...

If we customize the standard interface, the mapping used here is XSL we need to customize ..

*<!-- default rule which copies simply -->*

* <xsl:template match="@|node()" priority="1">

* <xsl:copy>*

* <xsl:apply-templates select="@|node()"/>

* </xsl:copy>*

* </xsl:template>*

In this code which are highlighted in BOLD, not able to get through the code..

Could you please help me to understand the code and guide me to walk through the standard XSL Code to check & where to see the XML structure which has used in the code.

Appreciate your help in advance...

Thanks,

Kumar.

Edited by: Kumar.S.V on May 18, 2009 5:15 PM

Edited by: Kumar.S.V on May 18, 2009 5:17 PM

Edited by: Kumar.S.V on May 18, 2009 5:18 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Kumar,

I couldnot understand your question properly. What I understood is:

You have a predefined structure and a predefined xsl mapping with a proxy communication. Now you have added 6 fields to your structure. Then you cannot use the standard proxy. So you create the proxy to your new structure and populate the values for the fields which you have added. Once you have done this then you may need to change the xsl mapping for these fields.

If you can give the structures and what needs to be done for these fields either I or somebody else can help you the xsl mapping.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Yes, you are right..

Before creating the new structure to generate proxy, i would like to go through the XSL mapping already defined for thr standard interface..since the structure is very very complex, couldn't able to paste the exact stucture...

<xsl:param name="BusinessSystemSender"/>

<xsl:param name="BusinessSystemReceiver"/>

<xsl:template match="/">

<xsl:comment>stamp

<xsl:apply-templates/>

</xsl:template>

<!-- default rule which copies simply -->

<xsl:template match="@*|node()" priority="1">

<xsl:copy>

<xsl:apply-templates select="@*|node()"/>

</xsl:copy>

</xsl:template>

<!-- specific node treatments for PartnerGUID -->

<xsl:template match="PartyID[@schemeAgencyID=$BusinessSystemSender and @schemeID='PartnerGUID']" priority="2">

<xsl:comment>source key:</xsl:comment>

<xsl:copy-of select="../PartyID[@schemeAgencyID=$BusinessSystemSender and @schemeID='PartnerGUID']"/>

<xsl:comment>target key produced (will be taken into account only if target customizing allows it):</xsl:comment>

<PartyID>

<xsl:attribute name="schemeAgencyID">

<xsl:value-of select="$BusinessSystemReceiver"/>

</xsl:attribute>

<xsl:attribute name="schemeID">

<xsl:value-of select="@schemeID"/>

</xsl:attribute>

<xsl:attribute name="schemeAgencySchemeAgencyID">

<xsl:value-of select="@schemeAgencySchemeAgencyID"></xsl:value-of>

</xsl:attribute>

<xsl:value-of select="."/>

</PartyID>

</xsl:template>

<!-- specific node treatments for PartnerID -->

<xsl:template match="PartyID[@schemeAgencyID=$BusinessSystemSender and @schemeID='PartnerID']" priority="2">

<xsl:comment>source key:</xsl:comment>

<xsl:copy-of select="../PartyID[@schemeAgencyID=$BusinessSystemSender and @schemeID='PartnerID']"/>

<xsl:comment>target key produced:</xsl:comment>

<PartyID>

<xsl:attribute name="schemeAgencyID">

<xsl:value-of select="$BusinessSystemReceiver"/>

</xsl:attribute>

<xsl:attribute name="schemeID">

<xsl:value-of select="@schemeID"/>

</xsl:attribute>

<xsl:attribute name="schemeAgencySchemeAgencyID">

<xsl:value-of select="@schemeAgencySchemeAgencyID"></xsl:value-of>

</xsl:attribute>

<xsl:value-of select="."/>

</PartyID>

</xsl:template>

This is the code which i can see for the XSL Mapping...

Let me know....

Appreciate your help in advance..

Thanks,

Kumar.

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

>>In this code which are highlighted in BOLD, not able to get through the code..

<!-- default rule which copies simply -->.. this is the comment statement....

match="@*|node() -

@* will match only the attribute node and

node() will match any node other that attribute and root node.

<copy> is use to copy the current node to the target.

This mapping will copy all nodes including the attribute node other that the root node to the target side.

http://www.w3.org/TR/xslt#patterns

>>where to see the XML structure which has used in the code.

This code is not restricted to any particular XML... it can be used with any XML...

Thanks,

SaNv...

former_member556412
Active Participant
0 Kudos

Hi,

Please go through the link, i hope this will help to answer your queries

http://www.w3schools.com/xsl/

Best Regards.

former_member556412
Active Participant
0 Kudos

Hi,

here is a link to a good tutorial for XSLT

please go through it hope it will help to answer your quires.

http://www.w3schools.com/

Best Regards.