RE: What to do about newlines in attribute values?

Ok take the flip side.
If we allow newlines in attributes, what is the case for being incompatible with XML in the data model for attributes (i.e. maintaining the newlines instead of turning to spaces)

-----------------------------------------------------------------------------
David Lee
Lead Engineer
MarkLogic Corporation
dlee@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com<http://www.marklogic.com/>


From: Uche Ogbuji [mailto:uche@ogbuji.net]
Sent: Friday, September 14, 2012 4:09 PM
To: public-microxml@w3.org
Subject: Re: What to do about newlines in attribute values?

On Fri, Sep 14, 2012 at 2:04 PM, David Lee <David.Lee@marklogic.com<mailto:David.Lee@marklogic.com>> wrote:
You could put your svg data in element content instead of attribute content then post-process that to HTML (moving it to an attribute).

Also how often do people hand edit large SVG data ?

It's more than just SVG.  When editing any list of tokens newlines are often a convenient way for a user to separate them.  Lists of tokens are a common use for XML attributes.

And anyway, I do probably hand edit SVG data with long coordinate lists every few weeks.  I don't think that's rare at all.  I generally use a tool to generate the basic SVG and then do the rest by hand.  I know there are a fair number who do so as well, and it's one of the selling points of SVG.

But as you say, without namespaces SVG would be a tricky one for MicroXML, anyway, which is why I point out that the convenience goes well beyond SVG.


--
Uche Ogbuji                       http://uche.ogbuji.net
Founding Partner, Zepheira        http://zepheira.com
http://wearekin.org
http://www.thenervousbreakdown.com/author/uogbuji/
http://copia.ogbuji.net
http://www.linkedin.com/in/ucheogbuji
http://twitter.com/uogbuji

Received on Friday, 14 September 2012 20:20:41 UTC