Dan Shelton schrieb am 01.07.2012 um 17:35 (+0200):
> On 1 July 2012 17:06, Dan Shelton <[email protected]> wrote:
> > In which context are newlines valid values, i.e. is a newline
> > character or a form feed a valid character in an attribute value?
> 
> Clarifying the question:
> Is this a valid xml fragment:
> -----cut-----
> <mytag myattribute="hello
>  world">sometext</mytag>
> -----cut-----

The document is well-formed. It is not *valid* because it doesn't have
a DOCTYPE. But you likely meant *well-formed*, not *valid*.

A newline in attribute values is okay, as is everything but either <&"
or <&'. [1] However, the parser is required to normalize all whitespace
characters to spaces. [2]

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

-- 
Michael Ludwig
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to