[Home] [By Thread] [By Date] [Recent Entries]

  • From: Imran Rashid <imranr@w...>
  • To: xml-dev@l...
  • Date: Thu, 04 Jan 2001 17:10:58 -0600

sorry, another schema newbie question.

I've been scanning the Schema CR's, but I can't seem to find anythig
relating to this.
    Can I restrict an element's content, based on one of its attributes?

for example:
say, <test/> could take numbers or strings.
could I have a "type" attribute, that coudl be either number or string, and
the contents type would have to be a numer or string respectively?

good:
<test type="number">5</test>
bad:
<test type="number">hello</test>


thanks,
Imran Rashid


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member