I would prefer if DSDL schemas used
"|" and "," rather than "&", to make the translation to DTDs and XSDs
obvious,
"mixed" rather than "{text & ... }*" to make the translation to XSD obvious
So
any-content = ( mixed {any-element*} )
any-attribute = attribute * {text} *
any-element = element * { any-attribute, any-content }
But Eric I don't understand one thing: how do those productions allow
multiple attributes?
It looks like "any-attribute" allows 1 single attribute of any name,
which is not what the intention is.
Cheers
Rick
Eric van der Vlist wrote:
> 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
>
>
-- 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 10:09:33 2006
This archive was generated by hypermail 2.1.8 : Fri Jun 30 2006 - 21:48:02 UTC