[dsdl-discuss] Re: Revised version of DSDL Part 8

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Thu Jun 29 2006 - 06:59:29 UTC

Le jeudi 29 juin 2006 à 11:08 +1000, Rick Jelliffe a écrit :
> Eric van der Vlist said:
> > Le mercredi 28 juin 2006 à 17:14 +0100, Martin Bryan a écrit :
> >> Jirka (and anyone else)
> >>
> >> Does
> >> any = element * { attribute * { text }* & any* & text }
> >> actually allow for the situation where you have mixed text (e.g. some
> >> text
> >> with an emphasized phrase within it?
> >
> > Yes, definitely.
>
> I think that definition is for any element that can contain anything
> including mixed content. While Martin wants just the content model.
>
> My RELAX NG compact syntax and idioms is rough and poor, but I think it
> would be clearer to split everything up: is this correct or too DTDish?
>
> any-content = { text | any-element }*
> any-attribute = { attribute * }*
> any-element = element * { any-attribute, any-content }

That's fine but some curly brackets should be turned into brackets and
"attribute *" is invalid and must be written "attribute * {text}".

The correct version is:

any-content = ( text | any-element )*
any-attribute = attribute * {text} *
any-element = element * { any-attribute, any-content }

Less DTDish ways of writing the any-content pattern are:

  any-content = ( text & any-element* )

and its equivalent:

  any-content = ( mixed {any-element*} )

The benefit of the last variant is to clearly say that we want mixed
content with any element :) ...

Eric

-- 
GPG-PGP: 2A528005
Curious about Relax NG? Read my book online.
                                   http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Thu Jun 29 09:07:12 2006

This archive was generated by hypermail 2.1.8 : Thu Jun 29 2006 - 08:13:04 UTC