The book on RelaxNG is free available on the Internet http://books.xmlschemata.org/relaxng/page2.html
It is released under the/Free Software Foundation GFDL <http://books.xmlschemata.org/relaxng/relax-APP-B.html>./ Bert On 04/10/2013 11:33 AM, Bert Verhees wrote: > On 04/09/2013 11:18 PM, Tim Cook wrote: >> Quickly though, there are no "tricks" to what we do in MLHIM. >> Everything is 100% W3C standards compliant. > By the way, the problem you solve by use of GUIDs can also be solved > by use of another validation-language: RelaxNG. > It is from Oasis (so also prestigious, even Microsoft is member > https://www.oasis-open.org/member-roster ), > and the OpenOffice-documents are validated this way. > > RelaxNG allows complex elements with different types in the same group > with the same name and checks at run/validation time how to validate > an element. > > Suppose you want this: > > <addressBook> > <card> > <givenName>John</givenName> > <familyName>Smith</familyName> > <email>js at example.com</email> > </card> > <card> > <name>Fred Bloggs</name> > <email>fb at example.net</email> > <note>bla bla bla</note> > </card> > </addressBook> > > Two kind of complextype of "card", one containing name, email and the > other containing firstName, familyName, email. > In XML-schema this is not possible. > > In RelaxNG the schema looks like this: > > element addressBook { > element card { > (element name { text } > | (element givenName { text }, > element familyName { text })), > element email { text }, > element note { text }? > }* > } > > It has a card-definition with two elements for both: email and note, > the element note is optional. > And it validates the first group as: it must be a name OR it must be > firstName and lastName. > > I think Tim, you can leave your GUIDs out of your element-names in > your schema's and validate against relaxNG > What do you think? > > Bert > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20130410/aed0355d/attachment.html>