<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Mark,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the update - the pre-release works nicely for my data.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
James.</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Mark Taylor <m.b.taylor@bristol.ac.uk><br>
<b>Sent:</b> Tuesday, 9 March 2021 4:19 AM<br>
<b>To:</b> Dempsey, James (IM&T, Black Mountain) <James.Dempsey@csiro.au><br>
<b>Cc:</b> Applications WG <apps@ivoa.net><br>
<b>Subject:</b> RE: Whitespace handling in VOTable field description</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">James,<br>
<br>
I've made a change to TOPCAT (and STILTS) so that for the purposes<br>
of one-line display, it does collapse the whitespace (in the XSD sense)<br>
of content that may have been acquired from a VOTable DESCRIPTION<br>
element. So you should see "some long text" in e.g. TOPCAT's<br>
column info window or STILTS's metadata output modes in future releases.<br>
They still keep track of the original whitespace internally, so<br>
for instance if the text is written back to DESCRIPTION elements<br>
on output, any whitespace formatting doesn't get lost.<br>
<br>
This is more sensible than the previous behaviour (" some long text"<br>
appearing in a JTable cell wasn't doing anybody any good),<br>
so thanks for raising this.<br>
<br>
The pre-release with changed behaviour is at<br>
<br>
<a href="ftp://andromeda.star.bris.ac.uk/pub/star/topcat/pre/topcat-full.jar">
ftp://andromeda.star.bris.ac.uk/pub/star/topcat/pre/topcat-full.jar</a><br>
<br>
in case you want to try it.<br>
<br>
Mark<br>
<br>
<br>
On Thu, 11 Feb 2021, Dempsey, James (IM&T, Black Mountain) wrote:<br>
<br>
> Hi Mark and Pierre,<br>
> <br>
> Thanks for the clarification. I was only checking the XSD, which is a bit different.<br>
> <br>
> The problem for me is that I specify in astropy a description "some long text" and when I view the votable in topcat it comes out as " some long text". Its not a big thing, it just looks untidy.<br>
> <br>
> Cheers,<br>
> James Dempsey<br>
> Senior Developer | CSIRO <br>
> james.dempsey@csiro.au | 02 6214 2912<br>
> <br>
> -----Original Message-----<br>
> From: Mark Taylor <m.b.taylor@bristol.ac.uk> <br>
> Sent: Wednesday, February 3, 2021 11:13 PM<br>
> To: Dempsey, James (IM&T, Black Mountain) <James.Dempsey@csiro.au><br>
> Cc: Applications WG <apps@ivoa.net><br>
> Subject: Re: Whitespace handling in VOTable field description<br>
> <br>
> Hi James,<br>
> <br>
> I would personally be reluctant to introduce this change to the standard unless it's causing major problems, since it might affect the behaviour of some existing software in unanticipated ways.<br>
> <br>
> As you observe, STIL doesn't take active steps to collapse whitespace during handling. But TOPCAT itself doesn't rely too heavily on the whitespace details either, e.g. column and parameter descriptions usually end up displayed on a single line.<br>
> So making a change like this probably wouldn't break TOPCAT behaviour in practice.<br>
> <br>
> The VOTable standard doesn't actually say what a client is supposed to do with whitespace in DESCRIPTION text; I wouldn't say that collapsing it for display or reformatting it for output is necessarily a bug.<br>
> Note the lack of discussion on this topic dates from VOTable 1.0 which was defined by a DTD not an XSD; I believe(?) that pre-XSD there was no way to declare that whitespace within an element should be collapsed.<br>
> <br>
> What exactly is the behaviour of astropy which you think contravenes the standard? Is it actually a bug or just a questionable formatting decision?<br>
> <br>
> Mark<br>
> <br>
> On Wed, 3 Feb 2021, Dempsey, James (IM&T, Black Mountain) wrote:<br>
> <br>
> > Hi Apps,<br>
> > <br>
> > I've noticed that topcat and astropy do not agree on how to handle <br>
> > whitespace in a VOTable field description. TOPCAT seems to be correct <br>
> > in that it preserves whitespace, but astropy is outputting a field <br>
> > description as<br>
> > <br>
> > <DESCRIPTION><br>
> > 1-sigma noise level of the spectrum in opacity units. Does not<br>
> > include emission noise.<br>
> > </DESCRIPTION><br>
> > <br>
> > which is expecting the whitespace to be collapsed (i.e. <xs:whiteSpace value="collapse"/>). Being too used to html I was surprised that the default whitespace rule for XML is 'preserve'.<br>
> > <br>
> > So, what do people think about changing the VOTable XML schema (and spec) to say the whitespace should be collapsed? If that isn't popular, I'll raise a bug with astropy.<br>
> > <br>
> > Cheers,<br>
> > James Dempsey<br>
> > Senior Developer<br>
> > Information Services Applications<br>
> > CSIRO Information Management & Technology (IM&T)<br>
> > <br>
> <br>
> --<br>
> Mark Taylor Astronomical Programmer Physics, Bristol University, UK<br>
> m.b.taylor@bristol.ac.uk <a href="http://www.star.bristol.ac.uk/~mbt/">
http://www.star.bristol.ac.uk/~mbt/</a><br>
> <br>
<br>
--<br>
Mark Taylor Astronomical Programmer Physics, Bristol University, UK<br>
m.b.taylor@bristol.ac.uk <a href="http://www.star.bristol.ac.uk/~mbt/">http://www.star.bristol.ac.uk/~mbt/</a></div>
</span></font></div>
</body>
</html>