on 06-15-2011 7:54 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
102 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.