
>>-XSR_UPDATE--(--rschema1--,--name1--,--rschema2--,------------>
>--name2--,--dropnewschema--)----------------------------------><
The schema is SYSPROC.
The XSR_UPDATE procedure is used to evolve an existing XML schema
in the XML
schema repository (XSR).
This enables you to modify or extend an existing XML schema so that
it can be used to validate both already existing and newly inserted
XML documents.
The original XML schema and the new XML schema specified as arguments
to XSR_UPDATE must both be registered and completed in the XSR before
the procedure is called. These XML schemas must also be compatible.
For details about the compatibility requirements see Compatibility
requirements for evolving an XML schema.
Authorization
The privileges held by the
authorization ID of the caller of the procedure must include at least
one of the following:
- DBADM authority.
- SELECT privilege on the catalog views SYSCAT.XSROBJECTS
and SYSCAT.XSROBJECTCOMPONENTS and one of the following sets of privileges:
- OWNER of the XML schema specified by the SQL schema rschema1 and
the object name name1
- ALTERIN privilege on the SQL schema specified by the rschema1 argument
and, if the dropnewschema argument is not
equal to zero, DROPIN privilege on the SQL schema specified by the rschema2 argument.
- rschema1
- An input argument of type VARCHAR (128) that specifies the SQL
schema for the original XML schema to be updated. The SQL schema is
one part of the SQL identifier used to identify this XML schema in
the XSR. (The other part of the SQL identifier is supplied by the name1 argument.)
This argument cannot have a null value. Rules for valid characters
and delimiters that apply to any SQL identifier also apply to this
argument.
- name1
- An input argument of type VARCHAR (128) that specifies the name
of the original XML schema to be updated. The complete SQL identifier
for the XML schema is rschema1.name1 . This
XML schema must already be registered and completed in the XSR. This
argument cannot have a null value. Rules for valid characters and
delimiters that apply to any SQL identifier also apply to this argument.
- rschema2
- An input argument of type VARCHAR (128) that specifies the SQL
schema for the new XML schema that will be used to update the original
XML schema. The SQL schema is one part of the SQL identifier used
to identify this XML schema in the XSR. (The other part of the SQL
identifier is supplied by the name2 argument.)
This argument cannot have a null value. Rules for valid characters
and delimiters that apply to any SQL identifier also apply to this
argument.
- name2
- An input argument of type VARCHAR (128) that specifies the name
of the new XML schema that will be used to update the original XML
schema. The complete SQL identifier for the XML schema is rschema2.name2.
This XML schema must already be registered and completed in the XSR.
This argument cannot have a null value. Rules for valid characters
and delimiters that apply to any SQL identifier also apply to this
argument.
- dropnewschema
- An input parameter of type integer that indicates whether the
new XML schema should be dropped after it is used to update the original
XML schema. Setting this parameter to any nonzero value will cause
the new XML schema to be dropped. This argument cannot have a null
value.
Example:
CALL SYSPROC.XSR_UPDATE(
'STORE',
'PROD',
'STORE',
'NEWPROD',
1)
The contents of the XML schema STORE.PROD is updated
with the contents of STORE.NEWPROD, and the XML schema STORE.NEWPROD
is dropped.