I’m writing a XMl schema to check an xml file.
I want to add a restriction that checks, if the value contains spaces. If it does, they should be deleted.
e.g.: “Hello world” -> check -> “Helloworld”
If this isn’t possible, I would like to throw an error when a space is found. I tried it with but this only works if the value is “” or ” ” and not with “hello world”.
Thanks for your help!
You cannot replace characters, but a type does not accept spaces might bed declared like so:
pattern is a regexp expression that you may change to better suite your needs.