Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding schema and namespace attributes with XMLFormat

Status
Not open for further replies.

ilnoca

Technical User
Jun 22, 2006
1
US
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:

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top