[relaxng-user] <attribute/> after <text/>?

John Cowan jcowan at reutershealth.com
Wed Nov 5 16:31:54 ICT 2003


David Tolpin scripsit:

> is it legal to have
> 
> <element name="x">
>   <text/>
>   <attribute name="y"/>
> </element>

Sure.  Because attribute ordering doesn't matter in XML, RNG always treats
attribute patterns in a group pattern (in this case, an implicit one)
as if they were interleaved.  Therefore, they can appear in any position
when they are children of an element pattern.

-- 
Using RELAX NG compact syntax to        John Cowan
develop schemas is one of the simple    http://www.reutershealth.com
pleasures in life....                   http://www.ccil.org/~cowan
        --Jeni Tennison                 <jcowan at reutershealth.com>


More information about the relaxng-user mailing list