cancel
Showing results for 
Search instead for 
Did you mean: 

B1iSN 2007 namespace x-schema:some.xdr and key expansion

kris_coppens
Explorer
0 Kudos

HI,

I have a problem reading a 3de party xml from which the root is tagged xmlns="x-schema:some.xdr". This schema indication makes the xpaths to dectect values in de Sender xml very hard.

In most cases the solutions is to incorporated an alias in the xsl ( xlmns:ABC="x-schema:some.xdr"). In key-expansions however ( more precisely in the META file calling the key-expansion with a key-value originating in de source xml ) it does not help to specify the namespace alias. I guess you have to make the alias somewhere else but I'm not finding where.

Does anyone has experience with this kind of issues ? Is there a way to work around this. ( FYI : it is not in my power to change the source XML file ... ). Or does anybody now where i should place the alias.

Thx for your replies.

Kris Coppens

Accepted Solutions (0)

Answers (1)

Answers (1)

bastian_schaefer
Active Contributor
0 Kudos

Hi Kris,

there are more possibilities to work with namespaces.

The easiest way is to ignore them.

Here you can work with keyword local-name() using in the xpath, e.g.:

//*[local-name()='PackingListHeader']/*[local-name()='PackingListNumber']

instead of

//xxx:PackingListHeader/xxx:PackingListNumber

where xxx stands for any namespace used.

Another possibilities is to define the sent namespace from the sender in <xsl:stylesheet> segment of your BIU, explicitly.

Just additionally define here xmlns:xxx="x-schema:some.xdr" and then use xxx as the namespace for your mapping.

Best regards

Bastian