Re: [xml] How to disable Attribute value normalization
- From: Daniel Veillard <veillard redhat com>
- To: Mike Lei <mike lei sun com>
- Cc: xml gnome org
- Subject: Re: [xml] How to disable Attribute value normalization
- Date: Fri, 6 Sep 2002 05:03:52 -0400
On Fri, Sep 06, 2002 at 09:16:17AM +0800, Mike Lei wrote:
Hi,
I want to keep all content of attribute value untouched so that my
application can interpret it other way . How can I do that ? it seems
xmlBlanksDefaut(1) only work for content of element node . If I retrieve
the attribute value by xmlGetProp, I get the normalized result . How can
I get the raw information ?
Well, you can't ... The XML specification is quite clear:
http://www.w3.org/TR/REC-xml#AVNormalize
"Before the value of an attribute is passed to the application or checked
for validity, the XML processor must normalize the attribute value by
applying the algorithm below, or by using some other method such that
the value passed to the application is the same as that produced by
the algorithm."
It's a MUST, not subject to user option.
What it probably means is that you decided to put in attribute text
which should really go into element content, because all compliant XML
parser will have to do the exact same modification of the character string
before passing it to the application.
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]