Spaces automatically added between bibliography elements

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
burbles
Posts: 37
Joined: Wed Dec 23, 2009 6:13 am

Spaces automatically added between bibliography elements

Post by burbles » Mon Jun 13, 2011 8:07 am

I have what appears to be a bug in that oXygen is adding single spaces between docbook elements every time the file is opened. The attached bibliodatabase.xml is valid DocBook 5 and elements within bibliomixed are correctly nested.

I edit the file to remove single spaces between most elements and save the changes. When I close the file and reopen it – either in the same oXygen session, or when I shit down then restart oXygen – the file has single spaces added between elements and the file is marked as having been modified (although the edits had been saved and the file simply reopened). This is the only file in a complex book that has this behavior (and the only file with bibliography elements), and it is critical because it affects the spacing between text in XHTML, epub and FO output.

I will send two screenshots to oXygen suppport, that show this behaviour after reopening the file.

The elements between which a single space is added are:
bibliomset – author
personname – firstname
firstname – surname
surname – personname
bibliomset – orgname
orgname – pubdate
pubdate – citetitle
citetitle – volnum
volnum – issuenum
issuenum – artpagenums
artpagenums - bibliomset

A single space is not, however, added between these elements:
bibliomixed – bibliomset
authorgroup – author
author – personname

It seems that mostly those elements containing text are affected.
I would request that the problem is replicated by editing the XML file to remove the single spaces between elements, then close and reopen the file. What is causing this behaviour and how is it resolved?
Dave

bibliography.xml file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<bibliography xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0" xml:id="references" label="" xml:lang="en-AU">
<title>References</title>
<bibliodiv>
<title>A</title>
<bibliomixed xml:id="abrs08">
<bibliomset><orgname>ABRS</orgname><pubdate>2008</pubdate><citetitle role="book"
>Australian Biological Resources Study</citetitle>Retrieved 17 September
2008,<link xlink:href="http://www.environment.gov.au/biodiversity/abrs/"
xlink:show="new" xlink:title="http://www.environment.gov.au/biodiversity/abrs/"
>http://www.environment.gov.au/biodiversity/abrs/</link></bibliomset>
</bibliomixed>
<bibliomixed xml:id="access07">
<bibliomset><orgname>Access Economics</orgname><pubdate>2007</pubdate><citetitle
role="book">Measuring the economic and financial values of the Great Barrier
Reef Marine Park 2005–06</citetitle><subtitle>Research Publication 88</subtitle><publisher>
<publishername>Great Barrier Reef Marine Park Authority</publishername>
<address>Townsville, Australia</address>
</publisher><link
xlink:href="http://www.gbrmpa.gov.au/corp_site/info_services/publications/research_publications"
xlink:title="http://www.gbrmpa.gov.au/corp_site/info_services/publications/research_publications"
xlink:show="new"
>http://www.gbrmpa.gov.au/corp_site/info_services/publications/research_publications</link>.</bibliomset>
</bibliomixed>
<bibliomixed xml:id="acheson88">
<bibliomset>
<author>
<personname role="last-first">
<firstname>JM</firstname>
<surname>Acheson</surname>
</personname>
</author>
<pubdate>1988</pubdate>
<citetitle role="book">The lobster gangs of Maine</citetitle>
<publisher>
<publishername>University Press of New England</publishername>
<address>Hanover, NH</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed xml:id="armcanz00">
<bibliomset>
<orgname>Agriculture & Resource Management Council of Australia & New
Zealand, Australian & New Zealand Environment & Conservation Council and
Forestry Ministers (ARMCANZ)</orgname>
<pubdate>2000</pubdate>
<citetitle role="book">Weeds of National Significance. Athel pine (Tamarix aphylla)
Strategic Plan</citetitle>
<publisher>
<publishername>National Weeds Strategy Executive Committee</publishername>
<address>Launceston</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed xml:id="alexander07">
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>LV</firstname>
<surname>Alexander</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>P</firstname>
<surname>Hope</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>D</firstname>
<surname>Collins</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>B</firstname>
<surname>Trewin</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>A</firstname>
<surname>Lynch</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>N</firstname>
<surname>Nicholls</surname>
</personname>
</author>
</authorgroup>
<pubdate>2007</pubdate>
<citetitle role="article">Trends in Australia’s climate means and extremes: a global
context</citetitle>
<citetitle role="journal">Australian Meterological Magazine</citetitle>
<volumenum>56</volumenum>
<issuenum>4</issuenum>
<artpagenums>1–18</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname>Alexander LV</personname>
</author>
<author>
<personname>Hope P</personname>
</author>
<author>
<personname>Collins D</personname>
</author>
<author>
<personname>Trewin B</personname>
</author>
<author>
<personname>Lynch A</personname>
</author>
<author>
<personname>Nicholls N</personname>
</author>
</authorgroup>
<pubdate>2007</pubdate>
<citetitle role="article">Trends in Australia’s climate means and extremes: a global
context</citetitle>
<citetitle role="journal">Australian Meterological Magazine</citetitle>
<volumenum>56</volumenum>
<issuenum>4</issuenum>
<artpagenums>1–18</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed xml:id="alford99">
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>RA</firstname>
<surname>Alford</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>SJ</firstname>
<surname>Richards</surname>
</personname>
</author>
</authorgroup>
<pubdate>1999</pubdate>
<citetitle role="article">Global amphibian declines: a problem, in applied
ecology</citetitle>
<citetitle role="journal">Annual Review of Ecology and Systematics</citetitle>
<volumenum>30</volumenum>
<artpagenums>133–165</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<orgname>Allen Consulting Group</orgname>
<pubdate>2005</pubdate>
<citetitle role="book">Climate change risk and vulnerability: promoting an efficient
adaptation response in Australia</citetitle>
<subtitle>Report to the Australian Greenhouse Office by the Allen Consulting
Group</subtitle>
<publisher>
<publishername>Australian Greenhouse Office</publishername>
<address>Canberra</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<author>
<personname role="last-first">
<firstname>RB</firstname>
<surname>Alley</surname>
</personname>
</author>
<pubdate>2000</pubdate>
<citetitle role="article">The Younger Dryas cold interval as viewed from central
Greenland</citetitle>
<citetitle role="journal">Quaternary Science Reviews</citetitle>
<volumenum>19</volumenum>
<artpagenums>213–226</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset><authorgroup>
<author>
<personname role="last-first"
><firstname>KD</firstname><surname>Alverson</surname></personname>
</author>
<author>
<personname role="last-first"
><firstname>RS</firstname><surname>Bradley</surname></personname>
</author>
<author>
<personname role="last-first"
><firstname>TF</firstname><surname>Pedersen</surname></personname>
</author>
</authorgroup> (Eds)<pubdate>2003</pubdate><citetitle role="book">Paleoclimate,
global change, and the future</citetitle><subtitle role="book">IGBP Global
Change Series</subtitle><publisher>
<publishername>Springer-Verlag</publishername>
<address>Berlin</address>
</publisher></bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>N</firstname>
<surname>Amos</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>JB</firstname>
<surname>Kirkpatrick</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>M</firstname>
<surname>Geise</surname>
</personname>
</author>
</authorgroup>
<pubdate>1993</pubdate>
<citetitle role="book">Conservation of biodiversity, ecological integrity and
ecologically sustainable development</citetitle>
<publisher>
<publishername>Australian Conservation Foundation and World Wide Fund for
Nature</publishername>
<address>Victoria</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>AN</firstname>
<surname>Andersen</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>GD</firstname>
<surname>Cook</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>LK</firstname>
<surname>Corbett</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>MM</firstname>
<surname>Douglas</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>RW</firstname>
<surname>Eager</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>J</firstname>
<surname>Russell-Smith</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>SA</firstname>
<surname>Setterfield</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>RJ</firstname>
<surname>Williams</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>JCZ</firstname>
<surname>Woinarski</surname>
</personname>
</author>
</authorgroup>
<pubdate>2005</pubdate>
<citetitle role="article">Fire frequency and biodiversity conservation in Australian
tropical savannas: implications from the Kapalga fire experiment</citetitle>
<citetitle role="journal">Austral Ecology</citetitle>
<volumenum>30</volumenum>
<artpagenums>155–167</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>AR</firstname>
<surname>Anderson</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>AA</firstname>
<surname>Hoffmann</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>SW</firstname>
<surname>McKechnie</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>PA</firstname>
<surname>Umina</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>AR</firstname>
<surname>Weeks</surname>
</personname>
</author>
</authorgroup>
<pubdate>2005</pubdate>
<citetitle role="article">The latitudinal cline in the In(3R)Payne inversion
polymorphism has shifted in the last 20 years in Australian <emphasis>Drosophila
melanogaster</emphasis> populations</citetitle>
<citetitle role="journal">Molecular Ecology</citetitle>
<volumenum>14</volumenum>
<artpagenums>851–858</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>K</firstname>
<surname>Anderson</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>A</firstname>
<surname>Bows</surname>
</personname>
</author>
</authorgroup>
<pubdate>2008</pubdate>
<citetitle role="article">Reframing the climate change challenge in light of
post-2000 emission trends</citetitle>
<citetitle role="journal">Philosophical Transactions. Series A, Mathematical,
Physical, and Engineering Sciences</citetitle>
<volumenum>366</volumenum>
<artpagenums>3863–3882</artpagenums>
<biblioid class="doi">10.1098/rsta.2008.0138</biblioid>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>KP</firstname>
<surname>Andersson</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>E</firstname>
<surname>Ostrom</surname>
</personname>
</author>
</authorgroup>
<pubdate>2008</pubdate>
<citetitle role="article">Analyzing decentralized resource regimes from a
polycentric perspective</citetitle>
<citetitle role="journal">Policy Sciences</citetitle>
<volumenum>41</volumenum>
<artpagenums>71–93</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>HG</firstname>
<surname>Andrewartha</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>LC</firstname>
<surname>Birch</surname>
</personname>
</author>
</authorgroup>
<pubdate>1954</pubdate>
<citetitle role="book">The distribution and abundance of animals</citetitle>
<publisher>
<publishername>University of Chicago Press</publishername>
<address>Chicago</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<author>
<personname role="last-first">
<firstname>D</firstname>
<surname>Archer</surname>
</personname>
</author>
<pubdate>2006</pubdate>
<citetitle role="book">Global warming: understanding the forecast</citetitle>
<publisher>
<publishername>Blackwell Publishers</publishername>
<address>Oxford, UK</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<author>
<personname role="last-first">
<firstname>NW</firstname>
<surname>Arnell</surname>
</personname>
</author>
<pubdate>1999</pubdate>
<citetitle role="article">Climate change and global water resources</citetitle>
<citetitle role="journal">Global Environmental Change</citetitle>
<volumenum>9</volumenum>
<artpagenums>S31–S49</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>RB</firstname>
<surname>Aronson</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>S</firstname>
<surname>Thatje</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>A</firstname>
<surname>Clarke</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>LS</firstname>
<surname>Peck</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>DB</firstname>
<surname>Blake</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>CD</firstname>
<surname>Wilga</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>BA</firstname>
<surname>Seibel</surname>
</personname>
</author>
</authorgroup>
<pubdate>2007</pubdate>
<citetitle role="article">Climate change and invasibility of the Antarctic
benthos</citetitle>
<citetitle role="journal">Annual Review of Ecology, Evolution, and
Systematics</citetitle>
<volumenum>38</volumenum>
<artpagenums>129–154</artpagenums>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<author>
<personname role="last-first">
<firstname>KJ</firstname>
<surname>Atkins</surname>
</personname>
</author>
<pubdate>2006</pubdate>
<citetitle role="book">Declared rare and priority flora list for Western
Australia</citetitle>
<publisher>
<publishername>Department of Environment and Conservation</publishername>
<address>Kensington, Perth</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<authorgroup>
<author>
<personname role="last-first">
<firstname>M</firstname>
<surname>Augee</surname>
</personname>
</author>
<author>
<personname role="last-first">
<firstname>M</firstname>
<surname>Fox</surname>
</personname>
</author>
</authorgroup>
<pubdate>2000</pubdate>
<citetitle role="book">Biology of Australia and New Zealand</citetitle>
<publisher>
<publishername>Pearson Education</publishername>
<address>Sydney</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<orgname>Australian and New Zealand Environment and Conservation Council
(ANZECC)</orgname>
<pubdate>2001</pubdate>
<citetitle role="book">Review of the National Strategy for the Conservation of
Australia’s Biological Diversity</citetitle>
<publisher>
<publishername>ANZECC</publishername>
<address>Australia</address>
</publisher>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset><orgname>Australian Bureau of
Statistics</orgname><pubdate>2008</pubdate>Retrieved 17 September 2008, <link
xlink:href="http://www.abs.gov.au/" xlink:show="new"
xlink:title="http://www.abs.gov.au/">http://www.abs.gov.au/</link></bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<orgname>Australian National Audit Office</orgname>
<pubdate>2003</pubdate>
<citetitle role="book">Performance audit: referrals, assessments and approvals under
the Environment Protection and Biodiversity Conservation Act 1999</citetitle>
<subtitle>Audit Report No. 38 2002–03</subtitle>
</bibliomset>
</bibliomixed>
<bibliomixed>
<bibliomset>
<orgname>Australian State of the Environment Committee</orgname>
<pubdate>2001</pubdate>
<citetitle role="book">Australia State of the Environment 2001</citetitle>
<publisher>
<publishername>CSIRO Publishing</publishername>
<address>Melbourne on behalf of the Department of the Environment and Heritage</address>
</publisher>
</bibliomset>
</bibliomixed>
</bibliodiv>
</bibliography>

Radu
Posts: 6592
Joined: Fri Jul 09, 2004 5:18 pm

Re: Spaces automatically added between bibliography elements

Post by Radu » Mon Jun 13, 2011 11:24 am

Hi Dave,

In the Editor / Format preferences page there is a checkbox called "Format and indent the document on open".
In my opinion this is checked in your case and that is probably why the document already appears as modified when you have just opened it.

Usually when format and indent is applied (both in Text using the toolbar button or when saving in the Author page) the operation is schema aware. This means that the bibliomset is determined to have mixed content and thus line breaks are not forcefully inserted between its child elements.
But the "Format and indent the document on open" operation does not yet seem to be schema-aware. We'll look into it and see if we can make an improvement for this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

burbles
Posts: 37
Joined: Wed Dec 23, 2009 6:13 am

Re: Spaces automatically added between bibliography elements

Post by burbles » Mon Jun 13, 2011 2:21 pm

Radu,
Thanks - that worked. Perhaps the "format and indent on open" should be checked off by default. I can't see what function it might serve, but those who need it should turn it on (rather than those who don't need it, turn it off).
Dave

Radu
Posts: 6592
Joined: Fri Jul 09, 2004 5:18 pm

Re: Spaces automatically added between bibliography elements

Post by Radu » Mon Jun 13, 2011 2:46 pm

Hi Dave,

The option is unchecked by default, you probably checked it to test something and then forgot that it was activated.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Radu
Posts: 6592
Joined: Fri Jul 09, 2004 5:18 pm

Re: Spaces automatically added between bibliography elements

Post by Radu » Fri May 23, 2014 12:17 pm

Hi,

Just to update this thread, starting with Oxygen 16.0 the "Format and indent on open" option is schema aware when determining which elements should be considered to be element only, mixed or space preserve.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply