You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Tim Cronin <ti...@13-colonies.com> on 2003/02/27 18:27:00 UTC

constraining a node value based off an attribute value in xsd

is there a way via a schema to constrain a node value base off of an
attribute value

I have an element
<Datum type="text">any text<Datum>

but if the type = color it needs to be a valid rgb color

<Datum type="color">#FFFFFF<Datum>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: constraining a node value based off an attribute value in xsd

Posted by Khaled Noaman <kn...@ca.ibm.com>.
No. That's a co-occurrence constraint that is not currently supported by
the schema spec.

Khaled

Tim Cronin wrote:

> is there a way via a schema to constrain a node value base off of an
> attribute value
>
> I have an element
> <Datum type="text">any text<Datum>
>
> but if the type = color it needs to be a valid rgb color
>
> <Datum type="color">#FFFFFF<Datum>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org