I want my XSD to validate the contents of a string. To be specific, I want to validate that a certain string does not occur.
Consider this rule, which
You don't mention whether you are bound to XML Schema 1.0 and XPath 1.0, but if not it is possible to accomplish your goal with xs:assert's, along the lines of this (which may need some work - this is from memory...):
Some links of possible interest:
http://www.ibm.com/developerworks/library/x-xml11pt2/
http://www.w3.org/TR/xpath-functions/#func-starts-with
Cheers,