OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng] Mixed and compact syntax


Eric van der Vlist scripsit:

> Sure... To me, text & (foo, bar) means in XML syntax (sorry but I am
> still more familiar with the XML syntax):

Ah, I believe I discern your problem.

> <interleave>
>  <text/>
>  <group>
>   <ref name="foo"/>
>   <ref name="bar"/>
>  </group>
> </interleave>

This does mean the same thing as the compact syntax above.

> 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"

No, either would be valid.  The point is that the <text/> pattern does
match a text node as such; rather it matches ZERO OR MORE text nodes;
"text" and "text*" mean the same thing.

> 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>

That works too.

-- 
John Cowan                              <jcowan@reutershealth.com>
http://www.reutershealth.com            http://www.ccil.org/~cowan
                .e'osai ko sarji la lojban.
                Please support Lojban!          http://www.lojban.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC