Skip to Content
avatar image
Former Member

XSLT Mapping: Replace the prefix tfd: and remove the namespace

Hi All,

I have a requirement where I need to replace tag tfd:Digital with cfdi:Digital Also I need to remove the below namespace from the cfdi:Content Tag.

xmlns:tfd="http://www.abc.com"

xsi:schemaLocation="www.abc.com.lv11.xsd"

Below is the my structure:

<cfdi:Component

cfdi:Component xmlns:tdCFDI="http://www.fht.boh.mx" xmlns:ns="http://www.fht.boh.com/ns/addenda/bf/3" xmlns:cfdi="http://www.fht.boh.mx/cfd/3"

Filed1="xx"

Field2="xx"

Field3="xxx">

<cfdi:Impute>...</cfdi:Impute>

<cfdi:Concet>..</Concet>

<cfdi:Content>

http://www.abc.com" xsi:schemaLocation="www.abc.com.lv11.xsd"

Field4="xx"

Field5="xxxxx"

.............../>

</cfdi:Content>

</Component>

Can anyone help with the XSLT code to achieve this requirement.

Thanks in advance,

Vamsi.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 25, 2017 at 11:15 AM

    You can try the UDF as per the below link(instead of blank pass the required Start Tag) and also XSL is mentioned to remove namespace

    https://answers.sap.com/questions/310832/removing-namespace-prefix-from-xml-file.html

    Add comment
    10|10000 characters needed characters exceeded