Hi folks,

Looking through the documentation, it appears to me that MarkLogic offers
some, but not all, of the features of schema validation as exists in
the XQuery specification?

I've been looking at loading some schema and associated instances into
our test server, and I can see that it is Doing The Right Thing with
regard to typecasting when faced with things like

        element(*, [type])

But it appears that validate {} are not currently implemented?

If my understanding is correct, I'd like to ask people how they generally
manager validation of XML they construct from within MarkLogic Server as
they shuffle data around in XQuery programs?

As an example of what I'm after, I've been playing around with writing
some functions which, using Saxon, define things in terms of strict
schema validation:

  declare function resource:ancestry(
    $uri as xs:anyURI)
  as schema-element(lin:ancestry) {
    validate {
      ...
      element {'lin:ancestry'} {
        ... construct contents ...
      }
      ...
    }
  }

with such a function I be assured, in Saxon, that the ancestory element
which is returned is valid according to the schema.  It looks like that
isn't directly possible.  That is to say, I can be assured I am returning
the proper *class* of element (e.g., named lin:ancestry, or in the general
class of seq:sequence if lin:ancestry descends from a complexType named
seq:sequence) -- but I can't promise that the contents of the element
itself are actually valid.

If the answer is "We don't worry about it," so be it. :)

My second question was on whether or not people used external validation
with their MarkLogic Server instances?  It looks to me like we could
pretty easily use the http POST functionality available to post documents
to a validation service, do any of you use this technique, or have you
found it easier to use some other technique?


Jim

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
James A. Robinson                       [EMAIL PROTECTED]
Stanford University HighWire Press      http://highwire.stanford.edu/
+1 650 7237294 (Work)                   +1 650 7259335 (Fax)
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to