Le jeudi 29 juin 2006 à 19:20 +1000, Rick Jelliffe a écrit :
> Actually, I guess Eric if you are looking for material for best
> practices for RELAX NG compact syntax, I would definitely say that
>
> any-attribute = attribute * {text} *
> is less good than
> any-attribute = { attribute * {text}} *
No! That should be "any-attribute = (attribute * {text}) *"
> (if that is indeed OK compact syntax). The first case is just wrong,
> visually, because you naturally expect the occurrence indicator to
> belong to the immediately previous thing. Yuck!
Sure, but {text} isn't a "thing" (or in the case of RELAX NG a
"pattern") :
* "(text)" is a pattern
* "attribute * {text}" is a pattern
* "{text}" is invalid by itself and it's just a piece of source
text that is used in a pattern definition.
That's why there is no possible confusion (at least for a RELAX NG
parser) and also why it is important to make a difference between () and
{} :)
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)
This archive was generated by hypermail 2.1.8 : Fri Jun 30 2006 - 21:48:02 UTC