[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng] Mixed and compact syntax
On Fri, 2002-07-05 at 20:54, John Cowan wrote: > Eric van der Vlist scripsit: > > > I find this very confusing for especially for "mixed{foo, bar}". People > > would probably expect this to mean "mixed content with ordered foo and > > bar" rather than a "group of foo and bar with any text node before or > > after the group"! > > To me, at least, those two expressions (in quotation marks) sound > exactly synonymous. Could you attempt to explain what you take the > difference to be? Sure... To me, text & (foo, bar) means in XML syntax (sorry but I am still more familiar with the XML syntax): <interleave> <text/> <group> <ref name="foo"/> <ref name="bar"/> </group> </interleave> ie, something not quite natural which if named patterns "foo" and "bar" match empty elements "foo" and "bar" would validate: "leading text <foo/> <bar/> trailing text" but not "leading text <foo/> text <bar/> trailing text" The "natural" ordered mixed content (compatible with the WXS definition of mixed content) would also validate this latest example and be represented in XML by: <group> <text/> <ref name="foo"/> <text/> <ref name="bar"/> <text/> </group> Have I missed something ? > > Makes me think that I have a more general question about the rules to > > read things such as: "p1, p2 | p3 & p4"... Are these allowed and how do > > they read? > > They are not allowed. Goooood! > BTW, in your RNG book (for which three cheers!) which are you going to > present as the primary syntax, compact or XML? The very first example [1] uses XML, the compact syntax is presented in the next chapter [3] and I try to include both the XML and the compact syntax for all the examples after this point in the book. [1] http://books.xmlschemata.org/relaxng/RngBookFirstSchema.html [2] http://books.xmlschemata.org/relaxng/RngBookNonXmlSyntax.html Thanks Eric > -- > John Cowan <jcowan@reutershealth.com> > http://www.ccil.org/~cowan http://www.reutershealth.com > Common Gaelic in Cyrillic script! > http://groups.yahoo.com/group/Celticonlang > > -- See you in San Diego. http://conferences.oreillynet.com/os2002/ ------------------------------------------------------------------------ Eric van der Vlist http://xmlfr.org http://dyomedea.com (W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema ------------------------------------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC