If I load a schema for documents then I presume I can start doing things like

          If( $f/@start_dt lt $f/@end_date  )
without having to do

          If( xs:dateTime($f/@start_dt) lt ($f/@end_date ) )

That would be really nice.

Couple questions.
Do I have to "validate" the documents in order to pull in the schema 
information ?

As in
http://www.w3.org/TR/xquery/#id-validate

and if so where do I need to do this ? when I first load the doc ? On any 
references in functions with nodes ?

Do I need to store an xsi:schemaLocatio in the document or will ML magically 
find my schemas by namespace ?


Finally ... is there a general rule about the overhead this incurs ? Obviously 
it can be 'free' but I could imagine cases where due to type caching that using 
a schema may be more efficient then lots of manual casts ... and certainly 
helps with tightening up method signatures and cleaning up expressions.

Any short "these are the easy tips" docs to read ?

Thanks
-David



----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
d...@epocrates.com<mailto:d...@epocrates.com>
812-482-5224

_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to