Re: [xml] May I have line breaks in a property?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@imag.fr)
Date: Sun Feb 11 2001 - 03:29:25 EST


  Same thing, end of line normalization:

    http://www.w3.org/TR/REC-xml#sec-line-ends

though I'm surprized libxml generates two 0A, only one should be there.
The goal is to standardize on only one way to tag end-of-line.

Daniel

On Sat, Feb 10, 2001 at 06:44:36PM -0800, ming lu wrote:
>
> Thank you very much for your reply. But after I changed it to element. I
> found the string I got from
> xmlNodeListGetString changed 0D0A (return for dos) to 0A0A. Anyway to get
> 0D0A instead? Thank you again for your help!
>
> > Hum, that's an interesting point.
> > Basically XML parser have to do attribute normalization, and this include
> > replacing newlines by blanks.
> > http://www.w3.org/TR/REC-xml#AVNormalize
> >
> > However when passed as numeric character reference in the serialization
> > (like 
 ) then the normalization doesn't apply, but currently libxml
> > doesn't check for extra spaces or newlines in attribute content when
> > saving, i.e. it doesn't escape them as character reference and then at
> next
> > parsing they would disapear anyway :-\, it's in the TODO but I never
> > took the time of handling this.
> >
> > A rule of thumbs is that if you have to encode multiline contents,
> > use an element and not an attribute, it fits really better in the
> > XML framework.
> >
> > Daniel
> >
> > --
> > Daniel Veillard | Red Hat Network http://redhat.com/products/network/
> > veillard@redhat.com | libxml Gnome XML toolkit http://xmlsoft.org/
> > http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> > ----
> > Message from the list xml@rpmfind.net
> > Archived at : http://xmlsoft.org/messages/
> > to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
> >
>
> ----
> Message from the list xml@rpmfind.net
> Archived at : http://xmlsoft.org/messages/
> to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Feb 11 2001 - 04:44:47 EST