Issue 36102 - XSLT filter: Remove 'dxa' conversion from measure_conversion.xsl
Summary: XSLT filter: Remove 'dxa' conversion from measure_conversion.xsl
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: external filters (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: jack.warchold
QA Contact: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-25 17:41 UTC by svante.schubert
Modified: 2005-02-02 13:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description svante.schubert 2004-10-25 17:41:58 UTC
A conversion of 'dxa' has been added to the measure_conversion.xsl stylesheet,
but dxa is not a measurement, but a naming derived from the MS binary file
format and always provided in the measurement TWIP (cmp.
http://www.msxnet.org/word2rtf/formats/dosword5).

Adapt the WordML stylesheets and recommit the earlier CVS version.

General constraint:
Be careful to not use an editor, which is changing spaces, as these changes will
become visible in the CVS.
Comment 1 glu 2004-10-26 05:33:54 UTC
Gary: Please take a look at it.
Comment 2 gyang 2004-10-29 10:23:42 UTC
to ->sus,
As we discussed in the previous email thread "twip/dxa in measure_conversion.xsl"
I won't fix this bug because:
It is  inconvenient for us to use the convert methods after the change from dxa
to twip.  It is because in MS word, it uses the 'dxa' to represent the twip
measurement internally. Looking at the following example, please:
<w:tcMar>
    <w:top w:w="142" w:type="dxa"/>
   ....
</w:tcMar>
The w:type can be dxa, nil, pct, or auto. Before the change from dxa to twip, I
can use the convert method like the below:
<xsl:call-template name="convert2in">
                 <xsl:with-param name="value" select="concat(w:tcMar/w:left/@w:w
, w:tcMar/w:left/@w:type) "/>
</xsl:call-template>

But now,we have to convert the w:type from 'dxa' to 'twip' first and then concat
the w:w and 'twip' in order to use the new convertion method. 

Comment 3 svante.schubert 2004-10-29 11:13:18 UTC
SUS->Gary:
Concerning the email thread 'Twip/dxa in measure_conversion.xsl', remember that
I finished the thread by a mail from 8/3/2004 9:41 AM pointing out that 'dxa' is
not a measurement, it is a surprise to me that you still want to keep the 'dxa'
conversion after the thread.

I assume, that you agree that 'dxa' is not a measurement and that it basically
has nothing to do in the measure_conversion.xsl stylesheet, even it looks
unconvenient for your work on the first sight.

Second, your approach has the downside, that from four of your possible values
('dxa, nil, pct, or auto') only one ('dxa') will be converted to twip (and even
this 'dxa' is not a measure), the other types are unknown to the conversion
stylesheet and their values will be returned without changing.
As I suspect that 'pct' has something to do with the pica measure (didn't found
it by a short look in the MS spec, you know this for sure), in case it is 'pica'
you would have to rename it anyway. You don't want really want to add 'pct'
aside of pica, don't you?

Besides, it is interesting that you explicitly concatenate 'dxa' to the value
(instead of 'twip') in the wordml stylesheets to trigger this measure conversion
even more times than are using the 'w:type'.

In total you are calling the conversion 17 times, please adapt them to map to
twip or their corresponding measures.
Comment 4 gyang 2004-11-01 02:05:45 UTC
gyang -> sus:
Yes, You could  say that I agree that  'dxa' is not a measurement in M$'s
document but practically it is used as a measurement in wordml. In contrast to
'dxa', the twip is documemted in M$ document as a measurement, but virtually it
is never used in wordml, at least I can't find such a place that is using twip.
So in my mind, it is M$ breaks the rule it made not us. In my opinion, I'd like
to keep both convert2twip and convert2dxa in measure_conversion.xsl.
Comment 5 gyang 2004-11-01 07:58:06 UTC
gyang->SUS:
As for  concatenating 'dxa' to the value becaue they are legacy code and now
they are easy to be replaced by twip. As for removing convert2dxa template, it
should be  considered again because:
1) it brings us a lots of inconvience 
2) it  definately slows down the perfomance because it requires more choose
-select statement. But so far, I haven't found the other value of w:type appearing.
I think that it might not remove convert2dxa template now. 
PS: the possible value of w:type please refer to the wordml schema (wordnet.xsd)
by search keyword "tableWidthPropertyType"
Comment 6 svante.schubert 2004-11-01 11:18:53 UTC
sus->gyang:
The measure_conversion.xsl stylesheet of the common folder was mentioned for
measurement conversion that are commonly used. 
Microsoft obvioulsy had made a design mistake by using 'dxa' and I would agree
adding it to the measurement, if the other possible values of your attribute
would match to the xsl:choose of the conversion template.
But it does not. What does the other possible values (nil, pct, or auto) mean?
Are you sure that the return of the same value is not an issue?
And don't you think that this proprietary measurement conversion belongs to this
Microsoft conversion solely? AFAIK even Microsoft's spreadsheetml does not use
'dxa'.
Therefore I propose to use this conversion in the wordml spreadsheet itself, as
it break the rule of the design.
Nevertheless it is not THIS important to me. When you have answers to the
questions above (esp. for the handling of the other possible values of the
attribute) you might add a comment to the measure_conversion.xsl about 'dxa' and
keep it.
Comment 7 gyang 2004-11-04 10:36:17 UTC
fixed!I  removed the convert2dxa template from measure_conversion.xsl stylesheet
and all wordml stylesheet. 
Comment 8 gyang 2004-11-18 11:34:58 UTC
reopen 
Comment 9 gyang 2004-11-18 11:36:12 UTC
reopen to reassign to jw, please verify 
Comment 10 gyang 2004-12-13 02:31:04 UTC
added developer note
Comment 11 jack.warchold 2004-12-13 15:13:36 UTC
reset to fixed
Comment 12 svante.schubert 2005-01-13 10:25:12 UTC
verified
Comment 13 jack.warchold 2005-02-02 13:47:10 UTC
seen good in src680_m76 -> closing