OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Validity Constraint: Element Valid For PCDATA



Hi. I'm new to this list and I don't know if this topic has already been 
discussed. I didn't find anything in the archives.

My questions is: if an element is declared as <!ELEMENT myelement (#PCDATA)>, 
is "<myelement></myelement>" valid.

It is clearly well-formed according to productions [39] (element), [43] 
(content), and [14] (CharData), but there is a Validity Constraint: Element 
Valid on production [39], which states "An element is valid if  ...  3. The 
declaration matches Mixed and the content consists of character data and child 
elements whose types match names in the content model."

Although production 14 say that CharData can be the empty set, it seems that 
this Validity Constraint is saying that there needs to be actual character 
data. Otherwise, why else would you have a Validity Constraint for empty 
character data?

Maybe I'm just not understanding the XML 1.0 spec. In fact the MSXML 3.0 parser 
says that "<myelement></myelement>"  is valid.

Anyone have a definitive answer on this?

Thanks,
Ted Krawiec