Classification: Public XML Schema 1.1 validation has become more interesting now that XML Spy 2014 has support for it.
The big advantage of 1.1, as I see it, is that 'xs:all' can now be fully used as a replacement for 'xs:sequence' to support order-insensitive XML documents. For XML that is data rather than human-readable content (and that's probably the majority of the XML in the world), that can be handy, removing artificially imposed sequencing in documents that are only there because there was no choice but to use 'xs:sequence'. The addition of Schematron-like validation rules is interesting too, but less of an issue when you are inside MarkLogic and have access to XQuery. Cheers, Tony. ____________________________________________________ Anthony B. Coates (Tony) VP | Solution/Data Architect Deutsche Bank AG, Filiale London Global Technology and Operations (GTO) 1 Appold Street, EC2A 2UU London, United Kingdom Tel. +44(20)754-77217 Mobile +44(79)0543-9026 Email [email protected] From: "Geert J." <[email protected]> To: MarkLogic Developer Discussion <[email protected]>, Date: 06/02/2014 08:13 Subject: Re: [MarkLogic Dev General] Validation against schema issue Hi Jakob, Late reply, hopefully still worthwhile.. I can’t answer about XML Schema 1.1 support, maybe Mary can? About low traffic on validation: I guess validation is indeed used less in MarkLogic, even though it is not difficult at all if you have good 1.0 xsd avaible. If you want certainty that all docs in the database validate against a specific xsd, then I would suggest using a pre-commit trigger on inserts. That way you can validate anything that gets inserted regardless of how it got inserted. It is also easy to superimpose upon pre-existing code, just like protected collections and such.. Cheers, Geert Van: [email protected] [mailto: [email protected]] Namens Jakob Fix Verzonden: woensdag 15 januari 2014 10:57 Aan: MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] Validation against schema issue hi, thanks for this. a couple of follow-up questions: - will there be support for xml schema 1.1 at some stage? - i have the impression that is very few talk about validation of documents on this list. is that because people don't validate? or because it's so easy that it's not worth mentioning? i'd be interested in patterns related to validation people are using. validation outside of the database? what about validation when a document is updated in the database, how do you assure the document is still valid? xdmp:validate, schema validation? other options? On Jan 14, 2014 7:28 PM, "Mary Holstege" <[email protected]> wrote: 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 checking in that way; mostly just assuming the schemas are OK. //Mary On Tue, 14 Jan 2014 09:43:44 -0800, Lanz <[email protected]> wrote: > 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 'indicator' as > extension types). The extensions types have their own elements in > addition > of the ones from the basic type. Some elements could be optional or > mandatory, they are 'unordered' (using xs:all). All these schemas use the > same namespace. > Because the root element is the same for the 2 extension type ('work') we > set the attribute 'schemalocation' in the 'work' root element to be sure > ML > uses the right schema during the validation. > The documents have been validated against its schema in Oxygen without > issue > > > Here is the issue! > When we try to validate a document before inserting it in Marklogic with > xdmp:validate using neither strict", "lax", or "type" (with its own > type), > it failed. > The error message mentions the right schema but does not take in account > the optional elements. > > Please find the mentioned (simplified) schema, XML sample and error > message > here : https://gist.github.com/anonymous/8422411 > > > Any help is welcome, many thanks > Lanz -- Using Opera's revolutionary email client: http://www.opera.com/mail/ _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
<<image/gif>>
<<image/gif>>
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
