Author |
Message
|
nathanw |
Posted: Wed Feb 23, 2005 6:51 am Post subject: XMLNS attr and extensions |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
hey there
ok using the sample logic of the attr type the logic of extension should be the same agreed?
OK
so to find a type i use the following within XML
Code: |
FIELDVALUE(Root.XML.(XML.Element)"XML".(XML.attr)type);
|
However for and extension when I do the same
Code: |
FIELDVALUE(Root.XMLNS.(XML.Element)"PORX_IN070103UK04".interactionId.(XML.attr)extension); |
it fails
the portion of the message I am looking at is
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<PORX_IN070103UK04 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<id root="1234567"/>
<creationTime value="20041202105055"/>
<versionCode code="V3NPfIT3.1.07"/>
<interactionId root="2.16.840.1.113883.2.1.3.2.4.12" extension="[color=red]PORX_IN070103UK04[/color]"/> |
Thanks In advance |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 23, 2005 7:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
when using XMLNS, you have to namespace qualify every element. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nathanw |
Posted: Wed Feb 23, 2005 7:33 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
THX Jeff
So I would have to write the esql like this?
Code: |
SET MSGTYPE = FIELDVALUE(Root.XMLNS.(XML.Element)"PORX_IN070103UK04".(XML.Element)"interactionId".(XML.attr)extension); |
well i tried this and it still came up with
Code: |
Failed to navigate to path element because it does not exist. |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 23, 2005 7:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No.
I mean that for each element in your XML document that belongs to a namespace, you have to include a reference to that namespace in your ESQL. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
nathanw |
Posted: Wed Feb 23, 2005 8:01 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
oh doodoo i just realised yu mean this
so it should be something like
SET MSGTYPE = FIELDVALUE(Root.XMLNS.(XML.Element)"urn:hl7-org:v3:PORX_IN070103UK04".(XML.Element)"urn:hl7-org:v3:interactionId".(XML.attr)extension);
as the trace looks like this
Code: |
(0x01000000)urn:hl7-org:v3:PORX_IN070103UK04 = (
(0x07000012):xmlns = 'urn:hl7-org:v3'
(0x07000012)xmlns:xsi = 'http://www.w3.org/2001/XMLSchema-instance'
(0x02000000): = '
'
(0x01000000)urn:hl7-org:v3:id = (
(0x03000000):root = '1234567'
)
(0x02000000): = '
'
(0x01000000)urn:hl7-org:v3:creationTime = (
(0x03000000):value = '20041202105055'
)
(0x02000000): = '
'
(0x01000000)urn:hl7-org:v3:versionCode = (
(0x03000000):code = 'V3NPfIT3.1.07'
)
(0x02000000): = '
'
(0x01000000)urn:hl7-org:v3:interactionId = (
(0x03000000):root = '2.16.840.1.113883.2.1.3.2.4.12'
(0x03000000):extension = 'PORX_IN070103UK04' |
|
|
Back to top |
|
 |
nathanw |
Posted: Fri Feb 25, 2005 4:29 am Post subject: *******SOLVED******** |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
the solution to my problem was 2 fold
firstly I added a RCD into the flow switching it back to normal XML
secondly the address to access the was set to be the following
Code: |
SET MSGTYPE = FIELDVALUE(Root.XML.(XML.Element)"PORX_IN070103UK04".interactionId.(XML.attr)extension); |
i feel as if i am floating now! |
|
Back to top |
|
 |
|