LISTSERV mailing list manager LISTSERV 16.0

Help for MODS Archives


MODS Archives

MODS Archives


[email protected]


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

MODS Home

MODS Home

MODS  July 2014

MODS July 2014

Subject:

Re: Losing whitespace from nonSort element

From:

Ashley Sanders <[log in to unmask]>

Reply-To:

Metadata Object Description Schema List <[log in to unmask]>

Date:

Wed, 9 Jul 2014 15:28:24 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (45 lines)

> Leading or trailing white space in XML elements and attributes can often be trimmed in processing or in other contexts (e.g., pretty printing). You can try explicitly encoding the space by using the numeric character entity &#160; (non-breaking space). You might also consider inserting the space when the data is processed/rendered rather than encoding it as data.

However, the problem is that it isn’t appropriate to always insert whitespace after a <nonSort> element. Consider
the following (made up) case:

<nonSort>L’</nonSort>
<title>Ecole</title>

So if there is non sortable whitespace it should be incorporated into the <nonSort> element.

This case looks like a bug, or bad assumptions, in the XML formatter. One shouldn’t
always trim whitespace.

Ashley.


> 
> Hope this helps,
> 
> Terry
> 
> 
> On Wed, Jul 9, 2014 at 10:09 AM, Vicky Phillips <[log in to unmask]> wrote:
> Hi,
> We seem to be losing the whitespace when formating xml e.g.
> 
> <nonSort>Yr </nonSort>
> <title>Annibynwr</title>
> 
> becomes
> 
> <nonSort>Yr</nonSort>
> <title>Annibynwr</title>
> 
> Any suggestions as to what we should do in order to retain this whitespace?
> Many thanks,
> Vicky
> Digital Standards Manager
> National Library of Wales
> 

--
Ashley Sanders [log in to unmask]
http://copac.ac.uk -- A Mimas service funded by JISC at the University of Manchester

Top of Message | Previous Page | Permalink

Advanced Options


Options

Error during command authentication.

Error - unable to initiate communication with LISTSERV (errno=111). The server is probably not started.

Log In

Log In

Get Password

Get Password


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager