Another XML challenge

Marcel van Tunen

Another XML challenge
Folks,

the challenge I'm facing looks like this:

I'll be having xml messages coming in that basically look like:

<message>

<payload>blabla</payload>
</message>

to validate this in DB2 I added a schema (SYSPROC.XSR_REGISTER) for the
message to the xsr.
I import de header and payload schema's in the message schema so I added
these two under the same NAME (XSR_ADDSCHEMADOC)

I can now validate the incoming message:
select
SYSIBM.DSN_XMLVALIDATE( :xmlstring, 'MESSAGE')
FROM SYSIBM.SYSDUMMY1

works fine (when you have all the namespaces right) BUT:

our header has the same schema for all messages so I don't want to store
it multiple times.
I want to reuse the same one over and over again.
I would like to store it apart from the message schema's and only
reference it.

so I would xsr_register the header
next xsr_register the message and xsr_addschemadoc the payload

is this possible? anyone met the same challenge?

Marcel van Tunen
Tata steel

**********************************************************************


This transmission is confidential and must not be used or disclosed by anyone other than the intended recipient. Neither Tata Steel Europe Limited nor any of its subsidiaries can accept any responsibility for any use or misuse of the transmission by anyone.

For address and company registration details of certain entities within the Tata Steel Europe group of companies, please visit http://www.tatasteeleurope.com/entities


**********************************************************************

_____________________________________________________________________
* IDUG North America * Anaheim, California * May 2-6 2011 * http://IDUG.ORG/NA *
* Your only source for independent, unbiased, and trusted DB2 information. *
** DB2 certification -> no additional charge
** Meet fellow DB2 users and leading DB2 consultants
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's Listserv