Re: [MarkLogic Dev General] cts query with validation to check

2014-01-14 Thread Gary Vidal
Not sure what version you are using but many of the element-xxx-functions support min-occurs=n max-occurs=n options. So you can use the following to test out the functionality xquery version "1.0-ml"; declare namespace html = "http://www.w3.org/1999/xhtml";; xdmp:document-insert("/test/progs/1

Re: [MarkLogic Dev General] cts query with validation to check the count of elements

2014-01-14 Thread Michael Blakeley
It might be best to enrich the XML. If you had in the XML, then you could range-index programs/@count as an integer. The query would be a trivial cts:element-range-query. Or since it seems that you only care about count eq 1 vs count gt 1, you could tag both types of document with their own co

Re: [MarkLogic Dev General] Validation against schema issue

2014-01-14 Thread Mary Holstege
I think the problem here is you are using XSD 1.1 and relying on one of its features. MarkLogic currently doesn't support XSD 1.1. Technically we ought to not even attempt the validation when you have an xs:all extended by an xs:all, but in general MarkLogic doesn't do a great job of schema ch

Re: [MarkLogic Dev General] Validation against schema issue

2014-01-14 Thread Lanz
Before any answer, the value of the xsi:schemaLocation in the XML sample is "http://www.oecd.org/ns/lambda/schema/ /metadata/summaryWorkType.xsd" and not xsi:schemaLocation="http://www.oecd.org/ns/lambda/schema/ test/SummaryWorkType.xsd" Lanz On Tue, Jan 14, 2014 at 6:43 PM, Lanz wrote: > Hi al

[MarkLogic Dev General] Validation against schema issue

2014-01-14 Thread Lanz
Hi all, Here is the context : we use Marklogic 7.0-1. we have a schema database containing ours schemas, this db is referenced in our doc db as the schema db. These schemas (version 1.1) defined a base type and 2 extension types (ie : a basic publication as a base type and a 'summary' and an 'indi

[MarkLogic Dev General] cts query with validation to check the count of elements

2014-01-14 Thread Gnanaprakash.Bodireddy
Hi Is there any way to have a cts query in which I can restrict the scope based on count? For example: I want to remove above document from search scope where we have 2 program elements. Regards,