× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




The SQL/XML support in DB2 for i 7.1 supports the W3C XML Schema standard
for validation. Validation using DTDs is not supported.
The industry direction is to use the W3C XML Schema specification, which is
more powerful and can handle XML namespaces. There are numerous tools
available for converting a DTD to an XML Schema (XSD); any good XML Schema
design tool very likely includes the capability, and there are some free
online converters available.

NOTE: You can still parse an XML Document that has a DTD declaration, you
just can't validate against the DTD. Create an equivalent XML schema for
the DTD, and validate the XML document using the XML schema.

It is possible to create an XSD file with a simple text editor or SEU, but
(for serious design work) I would recommend some more advanced tooling.
Tools like Rational Application Developer (RAD) make the job of visualizing
the XML Schema much easier, even though RAD does not have any IBM i
specific features. (XML Schema is a W3C recommendation, so lots of tools
support it...it should not be a problem to find one that is suitable for
your needs)

The XML prolog is supported in DB2, and is important because it contains
the encoding declaration. Without the encoding declaration, it is not
always possible for consumers of XML data to determine the encoding and
parse the XML document. You can force the declaration to be included by
using the "INCLUDING XMLDECLARAION" syntax on the XMLSERIALIZE function.
DB2 for i will set the encoding declaration to the encoding of the target
data type. e.g XMLSERIALIZE(my_xml_value AS CLOB(2G) CCSID 1208 INCLUDING
XMLDECLARATION) will add an encoding declaration for a UTF-8 encoding. The
default encoding (usually CCSID 1208/UTF-8) will be used if the target data
type is a binary type (BLOB).

Both of these topics are covered in the white paper.


Nick Lawrence
DB2 for IBM i

Success is not final, failure is not fatal: it is the courage to continue
that counts.
- Winston Churchill

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.