Re: [xml] How to disable Attribute value normalization



On Fri, Sep 06, 2002 at 05:13:56PM +0800, Mike Lei wrote:
It's a MUST, not subject to user option.

Thank you ! I know it.  But if element content can avoid normalizing, 
 why attribute value cannot ?  It seems unreasonable and not symmetric. 

  What is unreasonnable is to think that XML is symetric w.r.t. element
and attribute content while the specification clear show it isn't the case !

 In some case , it's better if element content is used as attribute 
value or vice verse without any data loss.

  Really no, you can't put them on an equal footing, they behaves
very differently, attributes are very limited, their content is 
processed, they are not structured, and don't allow recusion, and
even most tools don't allow to report entities boundaries when
they occur in attributes.
  Really stop thinking that attribute and element representation
are interchangeable, it's definitely not the case, its one of the
very first things one get teached when learning about designing
XML DTDs or content models.

  If your representation was drafted to handle text blobs in attribute
content and this requires exact processing then there is a serious
design error, sorry !

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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