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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML Schema question: A <xs:choice> equivalent for attributes?

Eddie Robertsson wrote:


> <xs:element name="socketHandler">
>     <xs:annotation>
>       <xs:appinfo>
>         <sch:pattern  xmlns:sch="http://www.ascc.net/xml/schematron">
>           <sch:rule context="socketHandler">
>             <sch:report test="self::*[@hostName][@hostAddress]"
>               > On a &lt;tag> element, if there is the attribute "attr", the
> child element &lt;attr>  must be prohibited and vice versa.</sch:report>

That message isn't very good at all. It should be something like:

<sch:report test="self::*[@hostName][@hostAddress]"> On a <sch:name/> element only
one of the attributes hostName and hostAddress are allowed, not both.</sch:report>

Sorry for the confusion