0

I am currently working on an external DTD file and am trying to create a DTD element that can only contain text, no numbers.

Currently I have my element as:

<!Element name(#PCDATA)>

But I think this means that it can accept all text (numbers, etc.) which is not what I am wanting.

Help? Thank you.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • So the element can contain `A`, `b`, `ç`, `$`, `+`, `ë`, and `→` but not `0`? – Quentin Oct 05 '16 at 16:54
  • You don't need to embed images. You just need to read the code formatting instructions next to the edit window (and not wipe out the edits I made to fix the problem for you). – Quentin Oct 05 '16 at 16:57
  • Well, it should only contain letters (a, b, c, etc.). No symbols or character entities. –  Oct 05 '16 at 16:59
  • So `A` is off the table but `A` is allowed even though they are identically equivilent in XML? – Quentin Oct 05 '16 at 17:01
  • It is not possible to *create a DTD element that can only contain text, no numbers*. See [duplicate link](http://stackoverflow.com/questions/35957102/how-to-add-xsd-datatype-restrictions-to-a-dtd) for further details. (You have to use XSD if you want that level of control over element content type.) – kjhughes Oct 05 '16 at 18:48
  • Oh, I see. Thanks! –  Oct 06 '16 at 20:12

0 Answers0