On Thu, 01 Nov 2007 06:40:23 -0700, Darren Govoni <[EMAIL PROTECTED]>
wrote:
I am trying to understand how MarkLogic supports or uses XML schema.
I read the admin and developers guide and understand how to load them,
but am not sure when/how they are used. The developer guide says they
are used when loading documents, but does not elaborate. Does this mean
if a document is loaded and its namespace is found in a schema it will
be validated automatically? Can someone describe this more clearly
please? I didn't see any of the tutorials refer to schemas.
Also, if MarkLogic does do schema validation, does it support all of XML
schema including the often troublesome xsd:redefine semantics?
The MarkLogic server does support XML schema, including tricky bits
like substitution groups and redefines. Note that the location "hints"
are required for import/redefime and refer to locations in the Schemas
database, not the web.
Once you have a schema loaded into your schemas database, MarkLogic server
will automatically use the schema for that namespace to construct the data
model -- assigning types, principally, as well as related issues such as
managing whitespace handling. So, for example, if your schema says some
particular attribute is of type xs:ID, that fact will be squirreled
away and the fn:id/fn:idref functions will pick the parent element out.
This type information is also in play for things like sequence type
matching.
For example, if your schema says element a and b are both of type foo then
$x instance of element(*,foo)
will be true for either a or b element instances.
However, MarkLogic server does not currently support the XQuery validate
expression, and you will not get an error if you load an invalid document:
you just won't get the type information you might have expected.
//Mary
Mary Holstege
Lead Engineer
Mark Logic Corporation
999 Skyway Drive
Suite 200
San Carlos, California 94070
+1 650 655 2336 Phone
[EMAIL PROTECTED]
www.marklogic.com
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general