ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasun Gajasinghe <kasu...@gmail.com>
Subject Attribute-Value Normalization of Axiom
Date Sat, 18 Feb 2012 13:13:48 GMT
Hi,

I have a question regarding how Axiom normalize attribute values. Say I
added an attribute to a document that has a newline character (\n  or #xA)
in the attribute value to a built OMDocument, and then serialize it. Now
doesn't the serialized content supposed to replace the newline character by
a space character (#x20) as of [1] 3.3 bullet point? Or am I looking at two
different things? Understanding how axiom behaves in these situations is
crucial when it comes to serializing etc.

Here's a code snippet of a test I did.

documentElement.addAttribute("attrName", " \n attVal     ", null);
documentElement.serialize(System.out);

The serialized xml contains - attrName=" &#xa; attVal    ". But I think it
should be " &#x20; attVal    ".

[1] http://www.w3.org/TR/REC-xml/#AVNormalize

Thanks for any help!
--Kasun

-- 
~~~*******'''''''''''''*******~~~
*Kasun Gajasinghe*
Software Engineer; WSO2 Inc.; http://wso2.com

,
*Linked-in: *http://lk.linkedin.com/in/gajasinghe*
*
*blog: **http://blog.kasunbg.org* <http://blog.kasunbg.org/>

*
twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>

Mime
View raw message