Daniel John Debrunner wrote:

<snip old XML type text>

That seems wrong to me, the use of "store Unicode character-based", any
implementation details are not important here. Also the use of "large"
is not relevant, what about small XML documents?

I have to admit, I'm guilty of copy-paste here. The current documentation for the CLOB type has the following sentence, which is the root of the questions raised in this email:

<begin quote>

A CLOB (character large object) value can be up to 2,147,483,647 characters long. A CLOB is used to store unicode character-based data, such as large documents in any character set.

<end quote>

I copied that as my starting point and failed to clean it up...sorry.

Looking at the other type definitions it seems something like this would
match, though it seems unwieldy.

"XML provides for storage of Extensible Markup Language (XML) documents,
that conform to the SQL/XML definition of a well-formed
XML(DOCUMENT(ANY)) value."

I agree, I think this is a better wording. My one reservation is that the XML type can also be used transiently for XML values that are not well-formed documents. In particular, the XMLQUERY operator returns a value of type XML that is not guaranteed to be XML(DOCUMENT(ANY)).

So while I agree with the new text proposal, I think it'd be good (or at least, more accurate) to mention that XML is not restricted to "storage of ... well-formed XML(DOCUMENT(ANY)) values"; it also provides for transient use of XML(SEQUENCE) values, which may or may not be well-formed XML(DOCUMENT(ANY)) values.

Also I'm not sure about the character limitation on the XML value, is
that the limit on the input string to the document, or its final
storage?

My impression is that this is the limit on the final storage--and that limit is, so far as I know, a Derby limitation, not a SQL/XML one. At least, that's what I assumed based on the fact that CLOBs in Derby have the same hard limit. I admit I could be wrong, here...please correct me if needed.

Not sure describing the final stored limit in terms of
characters makes sense here.

Agreed. Especially since it's possible that the way in which Derby stores XML could change in the future for better performance and/or extended functionality (XML indexing comes to mind). So no, we probably should not be describing the stored limit in terms of characters. I think that line could be removed entirely.

Should I add this info to the Reference Guide documentation wiki?

http://wiki.apache.org/db-derby/ReferenceManualTenTwo#sqlreference

Or would you like to? :)

Thanks for taking the time to buddy test the XML doc and features; I appreciate the feedback...

Army

Reply via email to