W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

RE: forbidding specific strings as content

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Wed, 2 Jan 2002 11:31:16 -0800
Message-Id: <8904C60CACA7D51191BC00805FEAAF43BFC9@crdc-exch-7.crdc.kp.org>
To: xmlschema-dev@w3.org
Cc: "'Michael Kohler'" <u_mkohler@UMassD.Edu>
> -----Original Message-----
> From:	Michael Kohler [SMTP:u_mkohler@UMassD.Edu]
> Sent:	Saturday, December 29, 2001 12:03 PM
> To:	xmlschema-dev@w3.org
> Subject:	forbidding specific strings as content
> 
> I am developing a schema that must make sure that the content of an
> element is a valid c identifier.  In order to do this I need to be able
> to provide a list of strings that are to be considered invalid content.
> 
> i.e.
> 	<ValidCIdentifier>else</ValidCIdentifier>
> --should not be allowed as 'else' is a reserved word, while 'elsea'
> would be allowed.
> 
> I have not seen any schema attribute or element that allows the
> definition of what is not allowed.  Patterns don't seem to be the
> correct way to go, but I could be wrong.
> 
> What would be the best way of achieving this?
> Any help would be appreciated.
> 
At present, pattern is the only way to acheive this...very awkward for long
lists, I know.  Noone has yet asked for this capability (kind of an
anti-enumeration), but I'll be sure we put it on the list of possible
enhancements for schema 2.0.

pvb
Received on Wednesday, 2 January 2002 14:42:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT