Hi Dave,

On mar, 2005-08-30 at 18:22 +0100, Dave Pawson wrote:
> I currently have
> 
> lexeme
>  zeroOrMore
>    choice
>      grapheme
>      phoneme
>      alias
>      example
>    /choice
>  /zeroOrMore
> /lexeme
> 
> The (English) requirement is 
> 
> The lexeme element contains 
> in any order
> one or more grapheme children,
> one or more of either phoneme or alias elements,
> zero or more example elements.
> 
> I've tried with relames
> 
>  <s:assert 
>       test="(count(phoneme) &gt;= 1) or (count(alias) &gt;= 1) ">There
> must be at least one (phoneme or alias child of lexeme)
>   </s:assert>
> 
> which seems not to work. (too many errors reported)

Wouldn't a 100% RNG pattern (Schematron free) work?

I'd be tempted to translate your English requirement as:

element lexeme {
        grapheme+ 
        & (phoneme|alias) +
        & example *
} 

That should work if by "one or more of either phoneme or alias elements"
you mean that their should be at least one of them. If you mean that you
need either one or more phoneme or one or more alias, you should change
that to:

element lexeme {
        grapheme+ 
        & (phoneme+|alias+) 
        & example *
} 

Or have I missed something?

Eric
> 
> Any suggestions please.
> 
> TIA DaveP
> 
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
-- 
Carnet web :
           http://eric.van-der-vlist.com/blog?t=category&a=Fran%C3%A7ais
------------------------------------------------------------------------
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
------------------------------------------------------------------------



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/2U_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rng-users/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to