[MKDoc-modules] Re: Encoding issues

patricka at mkdoc.com patricka at mkdoc.com
Tue Oct 14 13:48:51 BST 2003


William McKee writes: 

> Yuck, this is getting gory.

for serious blood and gore try: 

http://www.mit.edu/~ddcc/xhtmlref/text.html 

this also leads me to understand PCDATA (parsed character data) a bit. 

apparently dtd's convey exclusions (aka element prohibitions) which tell you 
what an element may contain. 

PCDATA seems to be plain text that *is* parsed to: 

 - convert any character entities, and
 - *prevent* you from using markup! 

back to that problem with <textarea>...
the html 4.01 strict dtd defines[2] <textarea> as: 

<!ELEMENT TEXTAREA - - (#PCDATA)       -- multi-line text field --> 

and so now you can understand why it cannot contain markup (because it's 
PCDATA). 

test cases with the w3 validator give: 

"document type does not allow element 'FOO' here" 

i haven't looked at schemas, but i certainly hope it's easier to determine 
exclusions! 

 - p 

1. http://www.w3.org/TR/xhtml1/#h-4.9
2. http://www.w3.org/TR/html4/sgml/dtd.html
3. http://validator.w3.org/docs/errors.html#not-allowed 




More information about the MKDoc-modules mailing list