I'm generating an XML doc to be stored as a CLOB using the sys_xmlagg function. I've been able to make a valid XML doc, but I can't figure out how to assign schema and namespace attributes to the enclosing tag using xmlformat.Createformat. Right now I have the code as:
When I try to add schema info I error out on execution:
The message I receive is Resource "'messages.xsd' is not an XDB schema document."
Since I'm adding an attribute I don't think I need to register the schema, but this is entirely new to me.
If it helps, the way I want to build the tag is:
<hl7:ORU_R01 xsi:schemaLocation="urn:hl7-org:v2xml messages.xsd" xmlns:xsi=" xmlns:hl7="urn:hl7-org:v2xml">
Thanks.
Code:
sys_xmlagg(
....
,xmlformat.Createformat('ORU_R01')).getCLOBVal()
When I try to add schema info I error out on execution:
Code:
sys_xmlagg(
....
,xmlformat.Createformat('ORU_R01', 'USE_GIVEN_SCHEMA','messages.xsd','[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance','urn:hl7-org:v2xml')).getCLOBVal()[/URL]
The message I receive is Resource "'messages.xsd' is not an XDB schema document."
Since I'm adding an attribute I don't think I need to register the schema, but this is entirely new to me.
If it helps, the way I want to build the tag is:
<hl7:ORU_R01 xsi:schemaLocation="urn:hl7-org:v2xml messages.xsd" xmlns:xsi=" xmlns:hl7="urn:hl7-org:v2xml">
Thanks.