Skip to Content
0

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

Sep 25, 2017 at 09:07 AM

42

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raghuraman S Sep 25, 2017 at 11:15 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded