XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Where does and doesn't whitespace matter?

On Thu, 2022-02-03 at 00:23 +0000, Roger L Costello wrote:
> 
> 2.5 Whitespace in an attribute value _does_ matter, e.g.,
> 
>         <foo  x = "   1   ">
> 

Attribute value normalization makes this the same as <foo x="1"> -
leading and trailing blanks are removed & internal whitespace sequences
are reduced to a single space.
> 
> 4.2 In an element whose content is elements interleaved with
> whitespace, the whitespace _does_ matter. With regard to the
> whitespace in the elements, see steps 2 - 4. Example:
> 
>         <foo>
>               <bar>  hello, world  </bar>
>               <baz>    glob    </baz>
>         </foo>
> 
> The whitespace between <foo> and <bar> _does_ matter. 

This depends on whether there's a declaration in effect saying that foo
is element-only, in which case the whitespace doesn't matter (see also
xml:space="preserve", however).

Liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS