Author |
Message
|
ggriffith |
Posted: Tue Oct 23, 2007 7:25 am Post subject: Mapping empty nodes with attributes |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
I've encountered the following problem using the mapping node
With an input of
<A B="xxxx">yyyy</A>
and mapping A to a similar node on the output I get the expected
<A>yyyy</A>
but when the input node A has no value, only an attribute
<A B="xxxx"/>
I get an unexpected result of
<A><B>xxxx</B></A>
Any ideas of how to get the expected <A/> or even no output node before I revert to good old ESQL. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 23, 2007 7:32 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Which domain are you using. If XMLNSC, you may be encountering a known defect. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 23, 2007 7:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What domain?
What mapping expression? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ggriffith |
Posted: Tue Oct 23, 2007 7:37 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
Correct I'm using the XMLNSC domain. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 23, 2007 7:44 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
It's a known defect. The fix is in v6 FP04.
For more details, search the forum for 'XMLNSC empty' |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 23, 2007 7:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kimbert wrote: |
It's a known defect. The fix is in v6 FP04.
For more details, search the forum for 'XMLNSC empty' |
You mean FP05. FP04 was withdrawn and additional fixes were incorporated to make it FP05. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ggriffith |
Posted: Mon Nov 05, 2007 7:01 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
OK, I've now updgraded to 6.0.0.5 and it's made no difference.
The mapping expression is a straight copy of $source<A> to $target<a>  |
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 05, 2007 1:10 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
If you're absolutely sure that XMLNSC is behaving incorrectly, please raise a PMR. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Nov 06, 2007 6:08 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
...and please mention that this is the same problem as PMR 12211,999,866. There is an IFix for FP03. |
|
Back to top |
|
 |
ggriffith |
Posted: Tue Nov 06, 2007 6:21 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
Found another post with a similar problem, where Jeff suggested using XMLNS instead. Tried this and it works perfectly.  |
|
Back to top |
|
 |
kimbert |
Posted: Tue Nov 06, 2007 7:00 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Note to all readers of this post...
ggriffith needs to get his message flow working, so he has probably made the correct decision. However, the XMLNSC behaviour described above is a defect and it has been fixed. I am going to install FP05 and confirm that it behaves correctly. Every other user who has reported this defect has installed the fix, and found that the problem was cured.
XMLNSC is the preferred XML parser. v6.1 has already put XMLNSC far ahead of XMLNS on both performance and function, and that pattern is going to continue. |
|
Back to top |
|
 |
ggriffith |
Posted: Tue Nov 06, 2007 8:57 am Post subject: |
|
|
 Acolyte
Joined: 17 Oct 2007 Posts: 67
|
I take it there's no secret extra step required in the FP05 install, in addition to
1. Decompress.
2. Run the wizard.
3. Restart the broker.
please note our MQSIProfile command states that we have upgraded to 6.0.0.5
As everyone else appears to have solved their problems with FP05 it would be good to know why we haven't.
I've noticed that there are varying scenarios of this this problem. If you're going to verify the fix could you duplicate our problem please. ie. mapping node that maps an empty node with attribute to target node.
iheader:OUTLET $source/tns1:Invoice/tns1:ShipTo/tns1:BuyerAssigned
and input of
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="http://www.eanucc.org/2002/Pay/FoodService/FoodService/UK/EanUcc/Pay"
xmlns:cc="http://www.ean-ucc.org/2002/gsmp/schemas/CoreComponents">
<ShipTo>
<BuyerAssigned scheme="GTIN"></BuyerAssigned>
</ShipTo>
</Invoice>
results in
<NS2:OUTLET>
<scheme>GTIN<scheme>
</NS2:OUTLET> |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 06, 2007 9:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll need to open the PMR if you want any official verification of the problem or official confirmation that the fix is not correct. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|