Roseanne Zhang,
Thanks for your kind advise. I will try to give some thought on it. I think I didn’t explain my problem properly or you couldn’t understand.
I am trying to find following things:
What exactly #PCDATA means when we define element-content as #PCDDTA?
<!ELMENT name (#PCDATA)>
& What exactly CDATA means when we define attribute type as CDATA?
<!ATTLIST name lastname CDATA “saxena”>
I understand that both represent a
string or text but there are some differences that I don’t understand. I was reading a book and I found following definition
“Keyword
PCDATA specifies that the element must contain parsable character data – that is , any text except the characters less-than (<) , greater-than (>) , ampersand (&), quote(') and double quote (") .
&
“Atrribute types are classified as either strings (
CDATA), tokenized or enumerated. String (
CDATA) attribute types do not impose any constraint on attribute values – other than disallowing the <,>,&,’ and “ characters. Entity reference must be used for these characters.”
So I understand one thing for sure that there are some constraint that are imposed by #PCDATA (when defined as element-content) but not by CDATA (when defined as attribute type), other than disallowing the <,>,&,' and " characters.
I need help to identify those constraints. May be I am too dumb to understand. May be that is why I am looking for help.
One more thing I found that,
“The
CDATA keyword in an attribute declaration has a different meaning than the
CDATA section in an XML document. In
CDATA section all characters are legal (including <,>,&,’ and “ characters) except the “]]>” end tag.”
So what you explained to me is has nothing to do with my problem. That I understand.
Looking forward to get some light here.
Thanks
vivek
[ January 28, 2003: Message edited by: Vivek Saxena ]
[ January 28, 2003: Message edited by: Vivek Saxena ]