Project

General

Profile

Actions

Bug #1537

closed

whitespace causes incorrect XSL conversion of eml2beta6 to eml2 in <unit>

Added by Chris Jones almost 20 years ago. Updated almost 20 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
morpho - general
Target version:
Start date:
04/27/2004
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1537

Description

The attribute dialogs in Morpho 1.4 allowed a researcher to enter a freetext
'unit' for typing a specific data column for tabular data. Morpho 1.4 seems to
introduce a leading whitespace in the value of the unit tag like:

<unit> ton</unit>

On XSL transformation using $MORPHO_HOME/xsl/eml2attr.xsl, the unit value is
compared to the standard unit dictionary that ships with EML2.0.0. If the
standard unit name is found, a <standardUnit> tag is created with the previous
value. If not, the default is to produce a <customUnit> tag.

Because of the introduced leading whitespace, ' ton' != 'ton', and therefore an
orphaned <customUnit> ton</customUnit> tag is generated, with no reference to
it's STMML unit definition.

Actions #1

Updated by Chris Jones almost 20 years ago

In order to do correct comparisons of STMML unit dictionary strings with
units that have incorrectly introduced leading or trailing whitespace, I've
used the normalize-space() XSLT function to strip the offending whitespace
in an otherwise identifiable unit string.

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 1537

Actions

Also available in: Atom PDF