[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: PCDATA element type and CDATA attribute type
Jesper Tverskov scripsit: > Having an element type called PCDATA and an attribute type called > CDATA is misleading since they are exactly the same for all practical > purposes. They are both parsed in the sense that character references > are replaced with the character and named references are expanded and > in the sense that we get wellformedness errors in both if they contain > markup? In CDATA, a < character is not interpreted as the beginning of markup. This is true of both CDATA attributes (where it's an error) and CDATA sections (where it is treated as a literal). > One could just as well have decided to call both PCDATA or CDATA. The > background for the two types are probably that it was called PCDATA > for elements to contrast it with a CDATA section escaping markup ... > forgetting to call it PCDATA also in attributes. A more sensible > working group would probably have decided for having just one "string" > data type to be used in both elements and attributes, and just one > name. The XML WG was constrained by SGML, where CDATA elements are also possible. The HTML SCRIPT and STYLE elements were originally declared as CDATA, but they are now terminated only by the appropriate end-tag, whereas SGML CDATA is terminated by any end-tag (and then it's an error if it's the wrong one). -- Possession is said to be nine points of the law, John Cowan but that's not saying how many points the law might have. cowan@ccil.org --Thomas A. Cowan (law professor and my father)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|